[pybliographer] Fix DateError crash at opening
- From: Zoltan Kota <zkota src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pybliographer] Fix DateError crash at opening
- Date: Tue, 8 Feb 2011 12:36:47 +0000 (UTC)
commit d3401dd41a3809d56691b8602c7a2cc2279222f1
Author: Zoltan Kota <zoltank gmail com>
Date: Tue Feb 8 13:36:49 2011 +0100
Fix DateError crash at opening
Opening a biblio file, which contains an invalid date value,
raises an error. Lets's catch Exceptions.DateError during
opening as well, and show the error dialog instead of a crash.
Pyblio/GnomeUI/Document.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/Pyblio/GnomeUI/Document.py b/Pyblio/GnomeUI/Document.py
index 909c5b4..1871641 100644
--- a/Pyblio/GnomeUI/Document.py
+++ b/Pyblio/GnomeUI/Document.py
@@ -541,7 +541,8 @@ class Document (Connector.Publisher):
except (Exceptions.ParserError,
Exceptions.FormatError,
- Exceptions.FileError), error:
+ Exceptions.FileError,
+ Exceptions.DateError), error:
Utils.error_dialog (_("Open error"), error,
parent = self.w)
@@ -626,7 +627,8 @@ class Document (Connector.Publisher):
except (Exceptions.ParserError,
Exceptions.FormatError,
- Exceptions.FileError), error:
+ Exceptions.FileError,
+ Exceptions.DateError), error:
Utils.set_cursor (self.w, 'normal')
Utils.error_dialog (_("Open error"), error,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]