Skip to content

Commit

Permalink
FIX open does not support an encoding argument, use codecs.open instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwagner committed Feb 8, 2014
1 parent 665d036 commit 4f109f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pbxproj/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import codecs

from .pbxobjects import PBXProjFile
from . import core
from . import isa
Expand All @@ -23,7 +25,7 @@ def write(fname_or_f, data, encoding=None):
#open file if fname_or_f is a string
#else use it as f
if isinstance(fname_or_f, str) or isinstance(fname_or_f, unicode):
f = open(fname, "w", encoding=encoding)
f = codecs.open(fname_or_f, "w", encoding=encoding)
else:
f = fname_or_f
#write project
Expand Down

0 comments on commit 4f109f2

Please sign in to comment.