aboutsummaryrefslogtreecommitdiff
path: root/gbp/scripts/buildpackage.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-07-04 20:03:26 +0200
committerGuido Günther <agx@sigxcpu.org>2016-07-04 21:02:54 +0200
commitf545010462b9a313fe3bf160bca9e44c3ea77b55 (patch)
tree31c7f3a7d469b113c60b71d0f4d15bc459ea7c4c /gbp/scripts/buildpackage.py
parentf2ad919cb98b3e1b1a537e2a43ece88961006b29 (diff)
Give more instructions when config is unparseable
and make return codes and messages consistent. This allows us to move some test code from the component tests to the unit tests which is always nice. Closes: #733640
Diffstat (limited to 'gbp/scripts/buildpackage.py')
-rwxr-xr-xgbp/scripts/buildpackage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index dab45e8..a792a04 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -41,6 +41,7 @@ from gbp.scripts.common.buildpackage import (index_name, wc_name,
git_archive_submodules,
git_archive_single, dump_tree,
write_wc, drop_index)
+from gbp.scripts.common import ExitCodes
from gbp.pkg import compressor_opts, compressor_aliases, parse_archive_filename
#{ upstream tarball preparation
@@ -496,7 +497,7 @@ def md(a, b):
def build_parser(name, prefix=None):
try:
parser = GbpOptionParserDebian(command=os.path.basename(name), prefix=prefix)
- except configparser.ParsingError as err:
+ except GbpError as err:
gbp.log.err(err)
return None
@@ -636,7 +637,7 @@ def main(argv):
options, gbp_args, dpkg_args = parse_args(argv, prefix)
if not options:
- return 1
+ return ExitCodes.parse_error
try:
repo = DebianGitRepository(os.path.curdir)