From: Tony Mack Date: Wed, 26 Oct 2011 17:38:14 +0000 (-0400) Subject: use RSpec.parse_dict() instead of manually updating the root element attributes X-Git-Tag: sfa-1.1-1~25 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=df2a7ea3511c2ae66fcb340d56a90e23ea81b406;p=sfa.git use RSpec.parse_dict() instead of manually updating the root element attributes --- diff --git a/sfa/util/record.py b/sfa/util/record.py index 420cc6fb..54c3f9f7 100644 --- a/sfa/util/record.py +++ b/sfa/util/record.py @@ -302,7 +302,7 @@ class SfaRecord(Row): recorddict = self.as_dict() filteredDict = dict([(key, val) for (key, val) in recorddict.iteritems() if key in self.fields.keys()]) record = XML('') - record.root.attrib.update(filteredDict) + record.parse_dict(filteredDict) str = record.toxml() return str