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