summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-08-12 00:16:39 -0700
committerJesse Keating <jkeating@redhat.com>2010-08-12 00:16:39 -0700
commit1401d6e1c366e3ae34685d4b3f62cf7afaeb3885 (patch)
treef7a24e0aa6bcb5dd364d476db87259a17215c76c
parentde0c8aa1bd6aa96dd28729234f9a81532720c44f (diff)
downloadfedora-packager-1401d6e1c366e3ae34685d4b3f62cf7afaeb3885.zip
fedora-packager-1401d6e1c366e3ae34685d4b3f62cf7afaeb3885.tar.gz
fedora-packager-1401d6e1c366e3ae34685d4b3f62cf7afaeb3885.tar.xz
Trap errors dealing with the lookaside. #622291
-rw-r--r--src/pyfedpkg/__init__.py10
1 files changed, 8 insertions, 2 deletions
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()