diff options
author | Rob Austein <sra@hactrn.net> | 2009-07-20 18:53:54 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-07-20 18:53:54 +0000 |
commit | 07c171db7ac89a803d982802a3cffc2e61213d3d (patch) | |
tree | c57809686fb192d9929c84ce9d0ccb26085a0d9b /rpkid | |
parent | 582d3b63aab36c3878ca57c109618d9377b1f2a1 (diff) |
Include exception data in <report_error/> PDU.
svn path=/rpkid/rpki/publication.py; revision=2652
Diffstat (limited to 'rpkid')
-rw-r--r-- | rpkid/rpki/publication.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rpkid/rpki/publication.py b/rpkid/rpki/publication.py index a8790e1e..bd320278 100644 --- a/rpkid/rpki/publication.py +++ b/rpkid/rpki/publication.py @@ -288,13 +288,14 @@ class report_error_elt(rpki.xml_utils.base_elt, publication_namespace): attributes = ("tag", "error_code") @classmethod - def from_exception(cls, exc, tag = None): + def from_exception(cls, e, tag = None): """ Generate a <report_error/> element from an exception. """ self = cls() self.tag = tag - self.error_code = exc.__class__.__name__ + self.error_code = e.__class__.__name__ + self.text = str(e) return self class msg(rpki.xml_utils.msg, publication_namespace): |