summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 18:11:17 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-30 18:11:17 (GMT)
commitb9678e71f32d0df8a7a3adfff4be09fe748dc786 (patch)
tree3ab3778c9499d7c79381264ca9efba9556312379
parentbd315c54dd3be6e5c478abd203a5b774a2a24e69 (diff)
downloadcpython-b9678e71f32d0df8a7a3adfff4be09fe748dc786.zip
cpython-b9678e71f32d0df8a7a3adfff4be09fe748dc786.tar.gz
cpython-b9678e71f32d0df8a7a3adfff4be09fe748dc786.tar.bz2
1/0 -> True/False cleanup.
-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 a107b26..2a7957e 100644
--- a/Lib/plat-mac/plistlib.py
+++ b/Lib/plat-mac/plistlib.py
@@ -69,10 +69,10 @@ def readPlist(pathOrFile):
(readable) file object. Return the unpacked root object (which
usually is a dictionary).
"""
- didOpen = 0
+ didOpen = False
if isinstance(pathOrFile, str):
pathOrFile = open(pathOrFile, 'rb')
- didOpen = 1
+ didOpen = True
p = PlistParser()
rootObject = p.parse(pathOrFile)
if didOpen:
@@ -84,10 +84,10 @@ def writePlist(rootObject, pathOrFile):
"""Write 'rootObject' to a .plist file. 'pathOrFile' may either be a
file name or a (writable) file object.
"""
- didOpen = 0
+ didOpen = False
if isinstance(pathOrFile, str):
pathOrFile = open(pathOrFile, 'wb')
- didOpen = 1
+ didOpen = True
writer = PlistWriter(pathOrFile)
writer.writeln("<plist version=\"1.0\">")
writer.writeValue(rootObject)