From b09a764ab05f48f31a55e74687e3acc355ae9d91 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 2 May 2003 00:57:02 +0000 Subject: [PATCH] Fix for export-to-gramps problem svn: r1486 --- gramps2/src/WriteXML.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gramps2/src/WriteXML.py b/gramps2/src/WriteXML.py index 4799eb2a5..d617ce914 100644 --- a/gramps2/src/WriteXML.py +++ b/gramps2/src/WriteXML.py @@ -135,11 +135,9 @@ class XmlWriter: Write the database to the specified file handle. """ - use_g = 0 if self.compress: try: g = gzip.GzipFile(mode="wb",fileobj=handle) - use_g = 1 except: g = handle else: @@ -148,9 +146,7 @@ class XmlWriter: self.g = codecs.getwriter("utf8")(g) self.write_xml_data() - self.g.close() - if use_g: - g.close() + g.close() def write_xml_data(self):