svn: r6988
This commit is contained in:
Alex Roitman 2006-07-04 05:50:24 +00:00
parent cf302f8a39
commit 39cd47357d

View File

@ -160,17 +160,17 @@ class XmlWriter(UpdateCallback):
return 0 return 0
self.fileroot = os.path.dirname(filename) self.fileroot = os.path.dirname(filename)
# try: try:
if self.compress: if self.compress:
try: try:
g = gzip.open(filename,"wb") g = gzip.open(filename,"wb")
except: except:
g = open(filename,"w")
else:
g = open(filename,"w") g = open(filename,"w")
else: except IOError,msg:
g = open(filename,"w") ErrorDialog(_('Failure writing %s') % filename,msg)
# except IOError,msg: return 0
# ErrorDialog(_('Failure writing %s') % filename,msg)
# return 0
self.g = codecs.getwriter("utf8")(g) self.g = codecs.getwriter("utf8")(g)