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:
30c38a6
)
Magic :-)
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Wed, 8 Jul 2009 18:38:25 +0000
(18:38 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Wed, 8 Jul 2009 18:38:25 +0000
(18:38 +0000)
sfa/util/record.py
patch
|
blob
|
history
diff --git
a/sfa/util/record.py
b/sfa/util/record.py
index
039652c
..
af079f3
100644
(file)
--- a/
sfa/util/record.py
+++ b/
sfa/util/record.py
@@
-272,10
+272,8
@@
class GeniRecord(dict):
Save the record to a string. The string contains an XML representation of
the record.
"""
Save the record to a string. The string contains an XML representation of
the record.
"""
- dict = self.as_dict()
- filteredDict = {}
- for key in self.public.keys():
- filteredDict[key] = dict[key]
+ recorddict = self.as_dict()
+ filteredDict = dict([(key, val) for (key, val) in recorddict.iteritems() if key in self.public.keys()])
record = RecordSpec()
record.parseDict(filteredDict)
str = record.toxml()
record = RecordSpec()
record.parseDict(filteredDict)
str = record.toxml()