Commit 5c14022e authored by tic20's avatar tic20
Browse files

PDBxFile only closes input file if it opens it.

parent a52611a8
......@@ -70,12 +70,15 @@ class PDBxFile(object):
# Load the file.
inputFile = file
ownHandle = False
if isinstance(file, str):
inputFile = open(file)
ownHandle = True
reader = PdbxReader(inputFile)
data = []
reader.read(data)
inputFile.close()
if ownHandle:
inputFile.close()
block = data[0]
# Build the topology.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment