diff options
author | Brian Harring <ferringb@gmail.com> | 2006-10-27 18:03:50 -0700 |
---|---|---|
committer | Brian Harring <ferringb@gmail.com> | 2006-10-27 18:03:50 -0700 |
commit | dfb2a95d968fc924b540eeb10cba29f7ff79badd (patch) | |
tree | 5e3cffd115de6de265dfef926a31f1b9b9685cf8 /bin/pwrapper | |
parent | fix info regen base to not regen needlessly for unmerge (do a pre modificatio... (diff) | |
download | pkgcore-dfb2a95d968fc924b540eeb10cba29f7ff79badd.tar.gz pkgcore-dfb2a95d968fc924b540eeb10cba29f7ff79badd.tar.bz2 pkgcore-dfb2a95d968fc924b540eeb10cba29f7ff79badd.zip |
subcommand support.
Diffstat (limited to 'bin/pwrapper')
-rwxr-xr-x | bin/pwrapper | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/pwrapper b/bin/pwrapper index 97ea59719..b8a52efcc 100755 --- a/bin/pwrapper +++ b/bin/pwrapper @@ -18,4 +18,7 @@ from pkgcore.util import modules, commandline if __name__ == '__main__': name = osp.basename(sys.argv[0]) script = modules.load_module('pkgcore.scripts.%s' % (name,)) - commandline.main(script.OptionParser(), script.main) + subcommands = getattr(script, 'commandline_commands', None) + if subcommands is None: + subcommands = {None: (script.OptionParser, script.main)} + commandline.main(subcommands) |