another open=>io.open change, as John advised
svn: r21720
This commit is contained in:
parent
0c46e5d91a
commit
8ed298daa0
@ -40,6 +40,7 @@ if sys.version_info[0] < 3:
|
|||||||
import ConfigParser as configparser
|
import ConfigParser as configparser
|
||||||
else:
|
else:
|
||||||
import configparser
|
import configparser
|
||||||
|
import io
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -192,10 +193,7 @@ class GrampletBar(Gtk.Notebook):
|
|||||||
"""
|
"""
|
||||||
filename = self.configfile
|
filename = self.configfile
|
||||||
try:
|
try:
|
||||||
if win() and not sys.version_info[0] < 3:
|
fp = io.open(filename, "w", encoding='utf-8')
|
||||||
fp = open(filename, "w", encoding='utf-8')
|
|
||||||
else:
|
|
||||||
fp = open(filename, "w")
|
|
||||||
except IOError:
|
except IOError:
|
||||||
print("Failed writing '%s'; gramplets not saved" % filename)
|
print("Failed writing '%s'; gramplets not saved" % filename)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user