Commits

Andrew Wooster committed 156bd03 Merge

Merge pull request #2 from trigger-corp/master

Allow biplist to work on Windows.

  • Participants
  • Parent commits 655b9ae, 711e276

Comments (0)

Files changed (1)

File biplist/__init__.py

     didOpen = False
     result = None
     if isinstance(pathOrFile, (str, unicode)):
-        pathOrFile = open(pathOrFile)
+        pathOrFile = open(pathOrFile, 'rb')
         didOpen = True
     try:
         reader = PlistReader(pathOrFile)
     else:
         didOpen = False
         if isinstance(pathOrFile, (str, unicode)):
-            pathOrFile = open(pathOrFile, 'w')
+            pathOrFile = open(pathOrFile, 'wb')
             didOpen = True
         writer = PlistWriter(pathOrFile)
         result = writer.writeRoot(rootObject)