Test
svn: r6988
This commit is contained in:
parent
cf302f8a39
commit
39cd47357d
@ -160,17 +160,17 @@ class XmlWriter(UpdateCallback):
|
||||
return 0
|
||||
|
||||
self.fileroot = os.path.dirname(filename)
|
||||
# try:
|
||||
if self.compress:
|
||||
try:
|
||||
g = gzip.open(filename,"wb")
|
||||
except:
|
||||
try:
|
||||
if self.compress:
|
||||
try:
|
||||
g = gzip.open(filename,"wb")
|
||||
except:
|
||||
g = open(filename,"w")
|
||||
else:
|
||||
g = open(filename,"w")
|
||||
else:
|
||||
g = open(filename,"w")
|
||||
# except IOError,msg:
|
||||
# ErrorDialog(_('Failure writing %s') % filename,msg)
|
||||
# return 0
|
||||
except IOError,msg:
|
||||
ErrorDialog(_('Failure writing %s') % filename,msg)
|
||||
return 0
|
||||
|
||||
self.g = codecs.getwriter("utf8")(g)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user