diff --git a/server/activator.py b/server/activator.py index 3c49fc47e..1547d36c2 100644 --- a/server/activator.py +++ b/server/activator.py @@ -1,4 +1,5 @@ #!/usr/bin/python2 -O +# -*- coding: utf-8 -*- """ @author: Fabio Erculiani @@ -73,13 +74,6 @@ if (' '.join(options).find("--version") != -1) or (' '.join(options).find(" -V") print_generic("activator: "+etpConst['entropyversion']) raise SystemExit(0) -# print help -if len(options) < 1 or ' '.join(options).find("--help") != -1 or ' '.join(options).find(" -h") != -1: - print_menu(myopts) - if len(options) < 1: - print_error("not enough parameters") - raise SystemExit(1) - import re opt_r = re.compile("^(\\-)([a-z]+)$") for n in range(len(options)): @@ -105,6 +99,13 @@ for opt in options: _options.append(opt) options = _options +# print help +if len(options) < 1 or ' '.join(options).find("--help") != -1 or ' '.join(options).find(" -h") != -1: + print_menu(myopts) + if len(options) < 1: + print_error("not enough parameters") + raise SystemExit(1) + rc = 1 if not entropyTools.is_root(): print_error("you must be root in order to run activator") diff --git a/server/reagent.py b/server/reagent.py index 3338dd5fa..2097bdcdd 100644 --- a/server/reagent.py +++ b/server/reagent.py @@ -1,4 +1,5 @@ #!/usr/bin/python2 -O +# -*- coding: utf-8 -*- """ @author: Fabio Erculiani @@ -116,13 +117,6 @@ if (' '.join(options).find("--version") != -1) or (' '.join(options).find(" -V") print_generic("reagent: "+etpConst['entropyversion']) raise SystemExit(0) -# print help -if len(options) < 1 or ' '.join(options).find("--help") != -1 or ' '.join(options).find(" -h") != -1: - print_menu(myopts) - if len(options) < 1: - print_error("not enough parameters") - raise SystemExit(1) - import re opt_r = re.compile("^(\\-)([a-z]+)$") for n in range(len(options)): @@ -148,6 +142,13 @@ for opt in options: _options.append(opt) options = _options +# print help +if len(options) < 1 or ' '.join(options).find("--help") != -1 or ' '.join(options).find(" -h") != -1: + print_menu(myopts) + if len(options) < 1: + print_error("not enough parameters") + raise SystemExit(1) + rc = 1 if not entropyTools.is_root(): print_error("you must be root in order to run "+sys.argv[0])