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')
|
||||
self._add_zip(zfile, "Pictures/%s" % image[1], ifile.read(), t)
|
||||
ifile.close()
|
||||
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