6265: can not make back up

svn: r20923
This commit is contained in:
Benny Malengier 2013-01-01 11:15:45 +00:00
parent 77f9760504
commit bfcecc646d
2 changed files with 8 additions and 5 deletions

View File

@ -39,7 +39,7 @@ import tarfile
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
from cStringIO import StringIO from cStringIO import StringIO
else: else:
from io import StringIO import io
from gramps.gen.ggettext import gettext as _ from gramps.gen.ggettext import gettext as _
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -63,7 +63,7 @@ from gi.repository import Gtk
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.plug.export import WriterOptionBox from gramps.gui.plug.export import WriterOptionBox
from exportxml import XmlWriter from .exportxml import XmlWriter
from gramps.gen.utils.file import media_path_full, get_unicode_path_from_file_chooser from gramps.gen.utils.file import media_path_full, get_unicode_path_from_file_chooser
from gramps.gen.constfunc import win from gramps.gen.constfunc import win
@ -214,7 +214,10 @@ class PackageWriter(object):
# select_clicked() # select_clicked()
# Write XML now # Write XML now
if sys.version_info[0] < 3:
g = StringIO() g = StringIO()
else:
g = io.BytesIO()
gfile = XmlWriter(self.db, self.user, 2) gfile = XmlWriter(self.db, self.user, 2)
gfile.write_handle(g) gfile.write_handle(g)
tarinfo = tarfile.TarInfo('data.gramps') tarinfo = tarfile.TarInfo('data.gramps')