2008-01-15 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDbUtils/_GrampsDbWriteXML.py: import gzip svn: r9828
This commit is contained in:
parent
da1495239a
commit
09a0d706e4
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user