aboutsummaryrefslogtreecommitdiff
path: root/gbp/scripts/buildpackage_rpm.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_rpm.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_rpm.py')
-rw-r--r--gbp/scripts/buildpackage_rpm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/scripts/buildpackage_rpm.py b/gbp/scripts/buildpackage_rpm.py
index 6f52a82..8c131f3 100644
--- a/gbp/scripts/buildpackage_rpm.py
+++ b/gbp/scripts/buildpackage_rpm.py
@@ -18,7 +18,6 @@
#
"""Build an RPM package out of a Git repository"""
-from six.moves import configparser
import os
import shutil
import sys
@@ -34,6 +33,7 @@ from gbp.pkg import compressor_opts
from gbp.rpm.git import GitRepositoryError, RpmGitRepository
from gbp.rpm.policy import RpmPkgPolicy
from gbp.tmpfile import init_tmpdir, del_tmpdir, tempfile
+from gbp.scripts.common import ExitCodes
from gbp.scripts.common.buildpackage import (index_name, wc_name,
git_archive_submodules,
git_archive_single, dump_tree,
@@ -317,7 +317,7 @@ def build_parser(name, prefix=None, git_treeish=None):
try:
parser = GbpOptionParserRpm(command=os.path.basename(name),
prefix=prefix)
- except configparser.ParsingError as err:
+ except GbpError as err:
gbp.log.err(err)
return None
@@ -479,7 +479,7 @@ def main(argv):
options, gbp_args, builder_args = parse_args(argv, prefix)
if not options:
- return 1
+ return ExitCodes.parse_error
try:
repo = RpmGitRepository(os.path.curdir)