9408: UnboundLocalError on ODF doc backend
This commit is contained in:
parent
1e9de5517f
commit
653e18db5a
@ -1217,7 +1217,7 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
|||||||
ifile = open(image[0], mode='rb')
|
ifile = open(image[0], mode='rb')
|
||||||
self._add_zip(zfile, "Pictures/%s" % image[1], ifile.read(), t)
|
self._add_zip(zfile, "Pictures/%s" % image[1], ifile.read(), t)
|
||||||
ifile.close()
|
ifile.close()
|
||||||
except:
|
except OSError as msg:
|
||||||
errmsg = "%s\n%s" % (_("Could not open %s") % image[0],
|
errmsg = "%s\n%s" % (_("Could not open %s") % image[0],
|
||||||
msg)
|
msg)
|
||||||
raise ReportError(errmsg)
|
raise ReportError(errmsg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user