git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a72a83d
)
use RSpec.parse_dict() instead of manually updating the root element attributes
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 26 Oct 2011 17:38:14 +0000
(13:38 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 26 Oct 2011 17:38:14 +0000
(13:38 -0400)
sfa/util/record.py
patch
|
blob
|
history
diff --git
a/sfa/util/record.py
b/sfa/util/record.py
index
420cc6f
..
54c3f9f
100644
(file)
--- 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/>')
- record.
root.attrib.update
(filteredDict)
+ record.
parse_dict
(filteredDict)
str = record.toxml()
return str