bugfix (aka oops, my bad)
[sfa.git] / sfa / util / xml.py
index 1abdad7..8111050 100755 (executable)
@@ -102,10 +102,9 @@ class XML:
         # element.attrib.update will explode if DateTimes are in the
         # dcitionary.
         d=d.copy()
-        for (k,v) in d.iteritems():
-            if not isinstance(v,StringTypes): del d[k]
+        # looks like iteritems won't stand side-effects
         for k in d.keys():
-            if (type(d[k]) != str) and (type(d[k]) != unicode):
+            if not isinstance(d[k],StringTypes):
                 del d[k]
 
         element.attrib.update(d)