From 653e18db5a3fefdcdc7ccc5948d1307e8b60cf78 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 16 May 2016 11:47:31 +0200 Subject: [PATCH] 9408: UnboundLocalError on ODF doc backend --- gramps/plugins/docgen/odfdoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gramps/plugins/docgen/odfdoc.py b/gramps/plugins/docgen/odfdoc.py index 6257f29dd..b86d69fbd 100644 --- a/gramps/plugins/docgen/odfdoc.py +++ b/gramps/plugins/docgen/odfdoc.py @@ -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)