aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-03-31 03:38:26 +0000
committerRob Austein <sra@hactrn.net>2016-03-31 03:38:26 +0000
commit8f1c98c3e2b0199a0af00d95c46c890df10082e3 (patch)
tree62648922fbb90c8064a7798f8a7cc7ce35feff79
parenta4cc47088b7b266c78780c65aa26e5b5873e9c7c (diff)
Preliminary fix for #799. I no longer have a proper test environment
for this, will take a little while to rebuild one, but the affected code is already broken and I doubt this will make it any worse, so committing it now to see if it solves Randy's immediate problem. svn path=/trunk/; revision=6341
-rw-r--r--rpki/gui/cacheview/util.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/rpki/gui/cacheview/util.py b/rpki/gui/cacheview/util.py
index 9e8748bf..47425c8c 100644
--- a/rpki/gui/cacheview/util.py
+++ b/rpki/gui/cacheview/util.py
@@ -42,7 +42,14 @@ from rpki.irdb.zookeeper import Zookeeper
logger = logging.getLogger(__name__)
+class SomeoneShowMeAWayToGetOuttaHere(Exception):
+ "'Cause I constantly pray I'll get outta here."
+
+
def rcynic_cert(cert, obj):
+ if not cert.sia_directory_uri:
+ raise SomeoneShowMeAWayToGetOuttaHere
+
obj.sia = cert.sia_directory_uri
# object must be saved for the related manager methods below to work
@@ -234,6 +241,10 @@ def save_status(repo, vs):
try:
# do object-specific tasks
dispatch[vs.file_class.__name__](obj, inst)
+ except SomeoneShowMeAWayToGetOuttaHere:
+ logger.error("something wrong with %s, skipping", vs.filename)
+ inst_qs.delete()
+ return
except:
logger.error('caught exception while processing rcynic_object:\n'
'vs=' + repr(vs) + '\nobj=' + repr(obj))