diff options
author | Rob Austein <sra@hactrn.net> | 2012-08-29 20:50:36 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-08-29 20:50:36 +0000 |
commit | ba0d95a8bd67b42bdbc9ba6cf09f1e50e1a2374c (patch) | |
tree | 72f48866db4e9ff55381261fc58f4ab4e73259e0 | |
parent | fb1e5dae89f503b9d97a8e0c1a075f7b3aefd6ab (diff) |
Bad things happen when __str__() methods forget to return the string.
svn path=/branches/tk274/; revision=4674
-rw-r--r-- | rpkid/rpki/xml_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpkid/rpki/xml_utils.py b/rpkid/rpki/xml_utils.py index 27c1f1e6..2e8a8691 100644 --- a/rpkid/rpki/xml_utils.py +++ b/rpkid/rpki/xml_utils.py @@ -206,7 +206,7 @@ class base_elt(object): """ Convert a base_elt object to string format. """ - lxml.etree.tostring(self.toXML(), pretty_print = True, encoding = "us-ascii") + return lxml.etree.tostring(self.toXML(), pretty_print = True, encoding = "us-ascii") @classmethod def make_pdu(cls, **kargs): @@ -451,7 +451,7 @@ class msg(list): """ Convert msg object to string. """ - lxml.etree.tostring(self.toXML(), pretty_print = True, encoding = "us-ascii") + return lxml.etree.tostring(self.toXML(), pretty_print = True, encoding = "us-ascii") def toXML(self): """ |