From 8921b1ad21876ce498c19832849ef5f8194e7132 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 16 May 2016 11:49:09 +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 9aa7f567b..af2d13ae1 100644 --- a/gramps/plugins/docgen/odfdoc.py +++ b/gramps/plugins/docgen/odfdoc.py @@ -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)