diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-04-04 10:05:25 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-04-04 10:05:25 +0200 |
commit | 738b3ca112979f6e95a6efaab0611df0c16ec135 (patch) | |
tree | 06475e2fdbb1a9bea53a3acb03c78ba3ca831783 /gbp/scripts/pq.py | |
parent | 59b7c1ea8c99fc25e2390cee6c1558a689402ad6 (diff) | |
parent | 7c415f8b75964423ec980e9ff3ada15896206356 (diff) |
Merge tag 'debian/0.6.13' into bpo/wheezy
git-buildpackage Debian release 0.6.13
Diffstat (limited to 'gbp/scripts/pq.py')
-rwxr-xr-x | gbp/scripts/pq.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py index 41d3ddf8..fc205bf2 100755 --- a/gbp/scripts/pq.py +++ b/gbp/scripts/pq.py @@ -210,9 +210,9 @@ def switch_pq(repo, current): switch_to_pq_branch(repo, current) -def parse_args(argv): +def build_parser(name): try: - parser = GbpOptionParserDebian(command=os.path.basename(argv[0]), prefix='', + parser = GbpOptionParserDebian(command=os.path.basename(name), usage="%prog [options] action - maintain patches on a patch queue branch\n" "Actions:\n" " export export the patch queue associated to the current branch\n" @@ -226,7 +226,7 @@ def parse_args(argv): " switch switch to patch-queue branch and vice versa") except ConfigParser.ParsingError as err: gbp.log.err(err) - return None, None + return None parser.add_boolean_config_file_option(option_name="patch-numbers", dest="patch_numbers") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, @@ -238,6 +238,13 @@ def parse_args(argv): parser.add_config_file_option(option_name="color", dest="color", type='tristate') parser.add_config_file_option(option_name="color-scheme", dest="color_scheme") + return parser + + +def parse_args(argv): + parser = build_parser(argv[0]) + if not parser: + return None, None return parser.parse_args(argv) |