Skip to content

Commit

Permalink
Merge pull request #19 from waveman68/patch-1
Browse files Browse the repository at this point in the history
Update inputparser.py to handle blank "default" NAME
  • Loading branch information
lauri-codes authored Jun 7, 2022
2 parents 2034ec6 + 0f2eef6 commit 2e0449e
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 @@ -46,7 +46,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 @@ -186,7 +190,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 2e0449e

Please sign in to comment.