aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gmail.com>2006-10-27 18:03:50 -0700
committerBrian Harring <ferringb@gmail.com>2006-10-27 18:03:50 -0700
commitdfb2a95d968fc924b540eeb10cba29f7ff79badd (patch)
tree5e3cffd115de6de265dfef926a31f1b9b9685cf8 /bin/pwrapper
parentfix info regen base to not regen needlessly for unmerge (do a pre modificatio... (diff)
downloadpkgcore-dfb2a95d968fc924b540eeb10cba29f7ff79badd.tar.gz
pkgcore-dfb2a95d968fc924b540eeb10cba29f7ff79badd.tar.bz2
pkgcore-dfb2a95d968fc924b540eeb10cba29f7ff79badd.zip
subcommand support.
Diffstat (limited to 'bin/pwrapper')
-rwxr-xr-xbin/pwrapper5
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)