Skip to content

Commit

Permalink
moved the check before length check
Browse files Browse the repository at this point in the history
  • Loading branch information
LauriKurki committed Sep 18, 2024
1 parent fa0b42a commit 4939276
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ppafm/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ def to_file(self, file_path: typing.Union[str, Path] = Path("params.toml")):
def load_ini(self, lines):
for line in lines:
words = line.split()
if words[0][0] == "#":
continue
if len(words) >= 2:
key = words[0]
if key[0] == "#":
continue
if hasattr(self, key):
val = getattr(self, key)
if verbose > 0:
Expand Down

0 comments on commit 4939276

Please sign in to comment.