diff --git a/scripts/ddl2cpp b/scripts/ddl2cpp index 2deec90f..c368338f 100755 --- a/scripts/ddl2cpp +++ b/scripts/ddl2cpp @@ -78,13 +78,14 @@ def usage(optionalArgs = {}): Usage: ddl2cpp \n\ ddl2cpp -help') -def help(): - argString = '\n' - for arg in list(optionalArgs.keys()): - if arg == '-help': + +def help_message(): + arg_string = '\n' + for argument in list(optionalArgs.keys()): + if argument == '-help': continue - argString = argString + ' [-[no]'+arg+'] ' + optionalArgs[arg] + '\n' - print('Usage: ddl2cpp [-help] ' + argString + ' ') + arg_string = arg_string + ' [-[no]'+argument+'] ' + optionalArgs[argument] + '\n' + print('Usage: ddl2cpp [-help] ' + arg_string + ' ') sys.exit(0) optionalArgs = { @@ -97,8 +98,8 @@ optionalArgs = { '-help': "show this help" } -if ('-help') in sys.argv: - help() +if '-help' in sys.argv: + help_message() # ARGUMENT PARSING if len(sys.argv) < (4): usage(optionalArgs)