From e24784f3c35149062c68f21c5b124676802c3553 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sun, 30 Jan 2011 14:51:26 -0700 Subject: Handle traceback if koji is down or unreachable. --- src/pyfedpkg/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/pyfedpkg') diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 7577823..d79fe1b 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1053,7 +1053,11 @@ class PackageModule: if not self.anonkojisession: self.init_koji() # We may not have Fedoras. Find out what rawhide target does. - rawhidetarget = self.kojisession.getBuildTarget('dist-rawhide') + try: + rawhidetarget = self.kojisession.getBuildTarget('dist-rawhide') + except: + # We couldn't hit koji, bail. + raise FedpkgError('Unable to query koji to find rawhide target') desttag = rawhidetarget['dest_tag_name'] return desttag.strip('dist-f') -- cgit