diff options
author | Rob Austein <sra@hactrn.net> | 2009-04-25 04:13:18 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-04-25 04:13:18 +0000 |
commit | 1efec3e593f8b925cc807ffd2132c38d415e5054 (patch) | |
tree | e947649c719aa7123f72f9518ceeb888c50bf8bf /rpkid/rpki/up_down.py | |
parent | 8542127f3bc823bbc7ff76e4ca8dc3bd0969318f (diff) |
Fix exception handling in error_response PDU generation
svn path=/rpkid/rpki/up_down.py; revision=2356
Diffstat (limited to 'rpkid/rpki/up_down.py')
-rw-r--r-- | rpkid/rpki/up_down.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/rpkid/rpki/up_down.py b/rpkid/rpki/up_down.py index 0134bbb8..15932c38 100644 --- a/rpkid/rpki/up_down.py +++ b/rpkid/rpki/up_down.py @@ -427,10 +427,7 @@ class error_response_pdu(base_elt): def __init__(self, exception = None): """Initialize an error_response PDU from an exception object.""" if exception is not None: - if exception in self.exceptions: - self.status = exceptions[exception] - else: - self.status = 2001 + self.status = self.exceptions.get(type(exception), 2001) self.description = str(exception) def endElement(self, stack, name, text): |