Skip to content

Commit

Permalink
don't use reserved word format and don't report found twice
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Nov 8, 2023
1 parent 919ec21 commit 53fbbc8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions prody/proteins/localpdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ def fetchPDB(*pdb, **kwargs):

folder = kwargs.get('folder', '.')
compressed = kwargs.get('compressed')
format = kwargs.get('format')
format_ = kwargs.get('format')

# check *folder* specified by the user, usually pwd ('.')
filedict = findPDBFiles(folder, compressed=compressed,
format=format)
format=format_)

filenames = []
not_found = []
Expand All @@ -231,8 +231,6 @@ def fetchPDB(*pdb, **kwargs):
elif pdb in filedict:
filenames.append(filedict[pdb])
exists += 1
LOGGER.debug('{0} file is found in working directory ({1}).'
.format(format.upper(), sympath(filedict[pdb])))
else:
filenames.append(None)
not_found.append((i, pdb))
Expand All @@ -242,7 +240,7 @@ def fetchPDB(*pdb, **kwargs):
filenames = filenames[0]
if exists:
LOGGER.debug('{0} file is found in working directory ({1}).'
.format(format.upper(), sympath(filedict[pdb])))
.format(format_.upper(), sympath(filedict[pdb])))
return filenames

if not isWritable(folder):
Expand Down

0 comments on commit 53fbbc8

Please sign in to comment.