summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/plistlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/plat-mac/plistlib.py')
-rw-r--r--Lib/plat-mac/plistlib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/plat-mac/plistlib.py b/Lib/plat-mac/plistlib.py
index 0daf3b5..b040237 100644
--- a/Lib/plat-mac/plistlib.py
+++ b/Lib/plat-mac/plistlib.py
@@ -70,7 +70,7 @@ def readPlist(pathOrFile):
usually is a dictionary).
"""
didOpen = 0
- if isinstance(pathOrFile, (str, unicode)):
+ if isinstance(pathOrFile, (str, str)):
pathOrFile = open(pathOrFile)
didOpen = 1
p = PlistParser()
@@ -85,7 +85,7 @@ def writePlist(rootObject, pathOrFile):
file name or a (writable) file object.
"""
didOpen = 0
- if isinstance(pathOrFile, (str, unicode)):
+ if isinstance(pathOrFile, (str, str)):
pathOrFile = open(pathOrFile, "w")
didOpen = 1
writer = PlistWriter(pathOrFile)
@@ -231,7 +231,7 @@ class PlistWriter(DumbXMLWriter):
DumbXMLWriter.__init__(self, file, indentLevel, indent)
def writeValue(self, value):
- if isinstance(value, (str, unicode)):
+ if isinstance(value, (str, str)):
self.simpleElement("string", value)
elif isinstance(value, bool):
# must switch for bool before int, as bool is a
@@ -270,7 +270,7 @@ class PlistWriter(DumbXMLWriter):
self.beginElement("dict")
items = sorted(d.items())
for key, value in items:
- if not isinstance(key, (str, unicode)):
+ if not isinstance(key, (str, str)):
raise TypeError("keys must be strings")
self.simpleElement("key", key)
self.writeValue(value)