Skip to content

Commit

Permalink
Update inputparser.py
Browse files Browse the repository at this point in the history
Deal with empty "default" NAME
  • Loading branch information
waveman68 authored Jun 7, 2022
1 parent 95bfde0 commit 0f2eef6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions inputparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ def validify_keyword(string):
"""
original = string
changed = False


if string == None:
print(" Keyword None replaced with NO_DEFAULT")
return "NO_DEFAULT"

if "-" in string:
changed = True
string = string.replace("-", "_")
Expand Down Expand Up @@ -178,7 +182,7 @@ def recursive_class_creation(section, level, class_dictionary, version_dictionar
newname = validify_keyword(name)
if keytype == "default":
default_name = newname
if name.startswith("__"):
if name != None and name.startswith("__"):
visible = False

# Now store the keywords as class attributes
Expand Down

0 comments on commit 0f2eef6

Please sign in to comment.