Fix plistlib to work with dict views.

This commit is contained in:
Brett Cannon 2007-02-21 21:18:18 +00:00
parent 75d26ccd7a
commit b38e2bcfd4
2 changed files with 2 additions and 3 deletions

View file

@ -268,8 +268,7 @@ class PlistWriter(DumbXMLWriter):
def writeDict(self, d):
self.beginElement("dict")
items = d.items()
items.sort()
items = sorted(d.items())
for key, value in items:
if not isinstance(key, (str, unicode)):
raise TypeError("keys must be strings")