From c00c5dbad18d67b278f2f8ce5d13c641f051818b Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 4 Jul 2006 05:50:24 +0000 Subject: [PATCH] Test svn: r6988 --- gramps2/src/GrampsDb/_WriteXML.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gramps2/src/GrampsDb/_WriteXML.py b/gramps2/src/GrampsDb/_WriteXML.py index cb11b3f30..486654931 100644 --- a/gramps2/src/GrampsDb/_WriteXML.py +++ b/gramps2/src/GrampsDb/_WriteXML.py @@ -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)