From 11f40dc20c6bd053db82cea18340532876981c05 Mon Sep 17 00:00:00 2001 From: strangeqargo <“strangeqargo@gmail.com”> Date: Sat, 14 May 2016 15:57:26 +0300 Subject: [PATCH] small cleanup, pre-merging --- scripts/ddl2cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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)