From 1401d6e1c366e3ae34685d4b3f62cf7afaeb3885 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 12 Aug 2010 00:16:39 -0700 Subject: Trap errors dealing with the lookaside. #622291 --- src/pyfedpkg/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/pyfedpkg/__init__.py') diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index d0d9139..acf9eeb 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -675,7 +675,10 @@ class Lookaside(object): curl.setopt(pycurl.WRITEFUNCTION, buf.write) curl.setopt(pycurl.HTTPPOST, post_data) - curl.perform() + try: + curl.perform() + except: + raise FedpkgError('Lookaside failure. Check your cert.') curl.close() output = buf.getvalue().strip() @@ -707,7 +710,10 @@ class Lookaside(object): # TODO: disabled until safe way to test is known. Watchout for the # file parameter: - curl.perform() + try: + curl.perform() + except: + raise FedpkgError('Lookaside failure. Check your cert.') curl.close() -- cgit