From e8bad4d4c8680aac59353cdf0f7b40bc67414294 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 28 Feb 2013 19:23:15 +0000 Subject: [PATCH] [r21492]grampletpane: Fix typo, naked except. Warn with the reason when Dashboard file can't be opened or parsed. svn: r21500 --- gramps/gui/widgets/grampletpane.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index b7fe1ba5a..b3dd10bcf 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -1136,7 +1136,9 @@ class GrampletPane(Gtk.ScrolledWindow): cp = configparser.ConfigParser() try: cp.read(filename) - except: + except Exception as err: + LOG.warning("Failed to load gramplets from %s because %s", + filename, str(err)) return [None] for sec in cp.sections(): if sec == "Gramplet View Options": @@ -1184,7 +1186,7 @@ class GrampletPane(Gtk.ScrolledWindow): fp.write(";; Gramps gramplets file\n") fp.write(";; Automatically created at %s" % time.strftime("%Y/%m/%d %H:%M:%S\n\n")) - fp.write("[Gramplet View Options\n]") + fp.write("[Gramplet View Options]\n") fp.write("column_count=%d\n" % self.column_count) fp.write("pane_position=%d\n" % self.pane_position) fp.write("pane_orientation=%s\n\n" % self.pane_orientation)