Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b38e2bc

Browse files
committed
Fix plistlib to work with dict views.
1 parent 75d26cc commit b38e2bc

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

BROKEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
test_bsddb test_bsddb3 test_compile test_dumbdbm
22
test_importhooks test_iter test_iterlen test_minidom test_mutants
3-
test_os test_plistlib
3+
test_os

Lib/plat-mac/plistlib.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ def writeData(self, data):
268268

269269
def writeDict(self, d):
270270
self.beginElement("dict")
271-
items = d.items()
272-
items.sort()
271+
items = sorted(d.items())
273272
for key, value in items:
274273
if not isinstance(key, (str, unicode)):
275274
raise TypeError("keys must be strings")

0 commit comments

Comments
 (0)