From 10dece68c48f1e7153ca7acdd0d1c2add515e381 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 14 Jul 2010 21:13:50 -0700 Subject: Log koji url and wrap the session init in a try --- src/pyfedpkg/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 06ade47..5828d93 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -980,7 +980,11 @@ class PackageModule: session_opts = {'user': user} # We assign the kojisession to our self as it can be used later to # watch the tasks. - self.kojisession = koji.ClientSession(defaults['server'], session_opts) + log.debug('Initiating a koji session to %s' % defaults['server']) + try: + self.kojisession = koji.ClientSession(defaults['server'], session_opts) + except: + raise FedpkgError('Could not initiate koji session') # save the weburl for later use too self.kojiweburl = defaults['weburl'] # log in using ssl -- cgit