Fix for export-to-gramps problem
svn: r1486
This commit is contained in:
parent
07f2a15999
commit
b09a764ab0
@ -135,11 +135,9 @@ class XmlWriter:
|
|||||||
Write the database to the specified file handle.
|
Write the database to the specified file handle.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
use_g = 0
|
|
||||||
if self.compress:
|
if self.compress:
|
||||||
try:
|
try:
|
||||||
g = gzip.GzipFile(mode="wb",fileobj=handle)
|
g = gzip.GzipFile(mode="wb",fileobj=handle)
|
||||||
use_g = 1
|
|
||||||
except:
|
except:
|
||||||
g = handle
|
g = handle
|
||||||
else:
|
else:
|
||||||
@ -148,8 +146,6 @@ class XmlWriter:
|
|||||||
self.g = codecs.getwriter("utf8")(g)
|
self.g = codecs.getwriter("utf8")(g)
|
||||||
|
|
||||||
self.write_xml_data()
|
self.write_xml_data()
|
||||||
self.g.close()
|
|
||||||
if use_g:
|
|
||||||
g.close()
|
g.close()
|
||||||
|
|
||||||
def write_xml_data(self):
|
def write_xml_data(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user