2008-01-15 Benny Malengier <benny.malengier@gramps-project.org>

* src/GrampsDbUtils/_GrampsDbWriteXML.py: import gzip



svn: r9828
This commit is contained in:
Benny Malengier 2008-01-15 20:00:54 +00:00
parent da1495239a
commit 09a0d706e4
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,6 @@
2008-01-15 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDbUtils/_GrampsDbWriteXML.py: import gzip
2008-01-15 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/SameSurnames.py (IncompleteSurname.apply):
can bring up people with empty surname

View File

@ -103,6 +103,11 @@ class GrampsDbXmlWriter(UpdateCallback):
"""
UpdateCallback.__init__(self, callback)
self.compress = compress
if self.compress:
try:
import gzip
except:
self.compress = False
self.db = db
self.strip_photos = strip_photos
self.version = version
@ -137,6 +142,7 @@ class GrampsDbXmlWriter(UpdateCallback):
self.fileroot = os.path.dirname(filename)
try:
if self.compress:
import gzip
try:
g = gzip.open(filename,"wb")
except:
@ -161,6 +167,7 @@ class GrampsDbXmlWriter(UpdateCallback):
"""
if self.compress:
import gzip
try:
g = gzip.GzipFile(mode="wb",fileobj=handle)
except: