diff options
author | Rob Austein <sra@hactrn.net> | 2011-04-04 15:16:16 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2011-04-04 15:16:16 +0000 |
commit | d37ca9c32ab7c2a8641f5a9a8f34169b19a0a14f (patch) | |
tree | ba29ef52441e844cd515d4ab23bfbaeb2487330e | |
parent | c96008b0960334d6465cc12f2057831e5720d809 (diff) |
Don't throw traceback on ChildNotFound
svn path=/rpkid/rpki/rpkid.py; revision=3755
-rw-r--r-- | rpkid/rpki/rpkid.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rpkid/rpki/rpkid.py b/rpkid/rpki/rpkid.py index f5fe6b7b..44fe1464 100644 --- a/rpkid/rpki/rpkid.py +++ b/rpkid/rpki/rpkid.py @@ -266,13 +266,15 @@ class main(object): child = rpki.left_right.child_elt.sql_fetch_where1(self, "self.self_handle = %s AND child.child_handle = %s AND child.self_id = self.self_id", (self_handle, child_handle), "self") if child is None: - raise rpki.exceptions.ChildNotFound, "Could not find child %s" % child_handle + raise rpki.exceptions.ChildNotFound, "Could not find child %s of self %s" % (child_handle, self_handle) child.serve_up_down(query, done) except (rpki.async.ExitNow, SystemExit): raise - except Exception, data: + except rpki.exceptions.ChildNotFound, e: + cb(400, str(e)) + except Exception, e: rpki.log.traceback() - cb(400, "Could not process PDU: %s" % data) + cb(400, "Could not process PDU: %s" % e) def checkpoint(self): """ |