summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-01-05 13:07:00 -0800
committerJesse Keating <jkeating@redhat.com>2010-01-05 13:07:00 -0800
commit5959b63fc9f738ff66d01ecbbe34d3e67ee0c2fb (patch)
tree53117f31ce219eb25c98c790c8f246916803f3f3 /src
parentec15c309a3149123609a105a2ff8584c86e4ada1 (diff)
downloadfedora-packager-5959b63fc9f738ff66d01ecbbe34d3e67ee0c2fb.tar.gz
fedora-packager-5959b63fc9f738ff66d01ecbbe34d3e67ee0c2fb.tar.xz
fedora-packager-5959b63fc9f738ff66d01ecbbe34d3e67ee0c2fb.zip
Wrap verrel in a try, and just exit
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fedpkg.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index 4c385f0..d5b394a 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -13,6 +13,7 @@
import argparse
import fedpkg
import os
+import sys
# Add a simple function to print usage, for the 'help' command
def usage(args):
@@ -151,7 +152,11 @@ def update(args):
print('Not implimented yet, got %s' % args)
def verrel(args):
- mymodule = fedpkg.PackageModule(args.path)
+ try:
+ mymodule = fedpkg.PackageModule(args.path)
+ except fedpkg.FedpkgError, e:
+ print('Could not get ver-rel: %s' % e)
+ sys.exit(1)
print('%s-%s-%s' % (mymodule.module, mymodule.ver, mymodule.rel))
# THe main code goes here