Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen committed May 21, 2024
1 parent d59eee2 commit 916c27d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custodian/vasp/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ def correct(self, directory="./"):

@staticmethod
def _get_nbands_from_outcar(directory: str) -> int | None:
nbands = None
with open(os.path.join(directory, "OUTCAR")) as file:
nbands = None
for line in file:
# Have to take the last NBANDS line since sometimes VASP
# updates it automatically even if the user specifies it.
Expand All @@ -691,7 +691,7 @@ def _get_nbands_from_outcar(directory: str) -> int | None:
break
except (IndexError, ValueError):
pass
return nbands
return nbands


class LrfCommutatorHandler(ErrorHandler):
Expand Down

0 comments on commit 916c27d

Please sign in to comment.