diff options
author | Brian Harring <ferringb@gmail.com> | 2011-06-23 01:49:42 -0700 |
---|---|---|
committer | Brian Harring <ferringb@gmail.com> | 2011-08-06 01:05:58 -0700 |
commit | b30505d391d772d0ad2b5ce0d4d564d04cda49af (patch) | |
tree | 1ca793779bee4c1d22fb593301a3457c9529b544 /bin | |
parent | split out non optparse bits into main, leaving just the parser invocation (diff) | |
download | pkgcore-b30505d391d772d0ad2b5ce0d4d564d04cda49af.tar.gz pkgcore-b30505d391d772d0ad2b5ce0d4d564d04cda49af.tar.bz2 pkgcore-b30505d391d772d0ad2b5ce0d4d564d04cda49af.zip |
enable argparse
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pwrapper | 6 | ||||
-rwxr-xr-x | bin/pwrapper_installed | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/bin/pwrapper b/bin/pwrapper index 9139cfeb..60c60ffb 100755 --- a/bin/pwrapper +++ b/bin/pwrapper @@ -27,7 +27,9 @@ except ImportError: if __name__ == '__main__': name = osp.basename(sys.argv[0]).replace("-", "_") script = modules.load_module('pkgcore.scripts.%s' % (name,)) - subcommands = getattr(script, 'commandline_commands', None) + subcommands = getattr(script, 'argparse_parser', None) if subcommands is None: - subcommands = {None: (script.OptionParser, script.main)} + subcommands = getattr(script, 'commandline_commands', None) + if subcommands is None: + subcommands = {None: (script.OptionParser, script.main)} commandline.main(subcommands) diff --git a/bin/pwrapper_installed b/bin/pwrapper_installed index 2aea117d..4a1187b0 100755 --- a/bin/pwrapper_installed +++ b/bin/pwrapper_installed @@ -28,7 +28,9 @@ if __name__ == '__main__': raise sys.stderr.write('Add --debug to the commandline for a traceback.\n') sys.exit(1) - subcommands = getattr(script, 'commandline_commands', None) + subcommands = getattr(script, 'argparse_parser', None) if subcommands is None: - subcommands = {None: (script.OptionParser, script.main)} + subcommands = getattr(script, 'commandline_commands', None) + if subcommands is None: + subcommands = {None: (script.OptionParser, script.main)} commandline.main(subcommands) |