From 32e108d2229f064e96a422fd9e8aa9e9f30763fb Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 5 Jan 2010 13:10:07 -0800 Subject: Wrap new_sources in a try --- src/fedpkg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fedpkg.py b/src/fedpkg.py index 837b2ba..590ca3c 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -100,8 +100,12 @@ def new(args): print('Not implimented yet, got %s' % args) def new_sources(args): - mymodule = fedpkg.PackageModule(args.path) - mymodule.new_sources(args.files) + try: + mymodule = fedpkg.PackageModule(args.path) + mymodule.new_sources(args.files) + except fedpkg.FedpkgError, e: + print('Could not upload new sources: %s' % e) + sys.exit(1) def patch(args): # not implimented -- cgit