Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update inputparser.py to handle blank "default" NAME #19

Merged
merged 1 commit into from
Jun 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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