5366: When doing a backup to a non existing directory, the error msg box is unreadable Only the first characters are shown
svn: r18701
This commit is contained in:
parent
8275c82787
commit
aa4285509c
@ -1574,13 +1574,13 @@ class ViewManager(CLIManager):
|
||||
if include.get_active():
|
||||
from ExportPkg import PackageWriter
|
||||
writer = PackageWriter(self.dbstate.db, filename,
|
||||
msg_callback=lambda m1, m2: ErrorDialog(m1[0], m1[1]),
|
||||
msg_callback=lambda m1, m2: ErrorDialog(m1, m2),
|
||||
callback=self.pulse_progressbar)
|
||||
writer.export()
|
||||
else:
|
||||
from ExportXml import XmlWriter
|
||||
writer = XmlWriter(self.dbstate.db,
|
||||
msg_callback=lambda m1, m2: ErrorDialog(m1[0], m1[1]),
|
||||
msg_callback=lambda m1, m2: ErrorDialog(m1, m2),
|
||||
callback=self.pulse_progressbar,
|
||||
strip_photos=0, compress=1)
|
||||
writer.write(filename)
|
||||
|
@ -176,7 +176,12 @@ class PackageWriter(object):
|
||||
fs_top.destroy()
|
||||
#---------------------------------------------------------------
|
||||
|
||||
archive = tarfile.open(self.filename,'w:gz')
|
||||
try:
|
||||
archive = tarfile.open(self.filename,'w:gz')
|
||||
except EnvironmentError, msg:
|
||||
log.warn(str(msg))
|
||||
self.msg_callback(_('Failure writing %s') % self.filename, str(msg))
|
||||
return 0
|
||||
|
||||
# Write media files first, since the database may be modified
|
||||
# during the process (i.e. when removing object)
|
||||
|
Loading…
Reference in New Issue
Block a user