Skip to content

Commit

Permalink
add some keyword checking
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Nov 1, 2022
1 parent a6cfa96 commit 1ebd140
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nemopy/getparam.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# command line parameter parsing tools
# 28-oct-2022 finally a good commandline parser
# 28-oct-2022 finally a NEMOish commandline parser
#
#
# things to think about:
Expand Down Expand Up @@ -62,6 +62,9 @@ def __init__(self, keyval, usage, debug=0):
equals = True
kv = a.split('=')
self.key[kv[0]] = kv[1]
if not kv[0] in self.k:
print("bad keyword ",kv[0])
sys.exit(0)

def get(self, keyword):
return self.key[keyword]
Expand Down

0 comments on commit 1ebd140

Please sign in to comment.