summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-12-02 16:04:57 -0800
committerJesse Keating <jkeating@redhat.com>2010-12-02 16:04:57 -0800
commit75fb5c6cffd889cc1076b84abc64bd1c055768bc (patch)
tree44dfafa2439785668e791162a675c515dcd79a05
parent69ce758822f102f1f7ffa3b4aa6c1ca09edea3cb (diff)
downloadfedora-packager-75fb5c6cffd889cc1076b84abc64bd1c055768bc.zip
fedora-packager-75fb5c6cffd889cc1076b84abc64bd1c055768bc.tar.gz
fedora-packager-75fb5c6cffd889cc1076b84abc64bd1c055768bc.tar.xz
Add a dash of error checking to update (#655576)
-rwxr-xr-xsrc/fedpkg.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index ff94f0e..11670aa 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -753,7 +753,11 @@ def unusedpatches(args):
def update(args):
"""Submit a new update to bodhi"""
user = getuser(args.user)
- mymodule = pyfedpkg.PackageModule(args.path)
+ try:
+ mymodule = pyfedpkg.PackageModule(args.path)
+ except pyfedpkg.FedpkgError, e:
+ log.error('Could not use module: %s' % e)
+ sys.exit(1)
nvr = '%s-%s-%s' % (mymodule.module, mymodule.ver, mymodule.rel)
template = """\
[ %(nvr)s ]