From bdb4a5ed149805f3da25d8112360503bc0121ae1 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 11 Aug 2010 23:49:37 -0700 Subject: Catch fedpkg errors when trying to build. #620595 --- src/fedpkg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/fedpkg.py') diff --git a/src/fedpkg.py b/src/fedpkg.py index 51ee2c8..f5cee54 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -320,8 +320,12 @@ def build(args): print('') url = '%s/%s' % (uniquepath, os.path.basename(args.srpm)) # Should also try this, again not sure what errors to catch - task_id = mymodule.build(args.skip_tag, args.scratch, args.background, - url, chain) + try: + task_id = mymodule.build(args.skip_tag, args.scratch, args.background, + url, chain) + except pyfedpkg.FedpkgError, e: + log.error('Could not initiate build: %s' % e) + sys.exit(1) # Now that we have the task ID we need to deal with it. if args.nowait: # Log out of the koji session -- cgit