[kupfer] plugin.google: Catch IO and OS Errors when reading search descriptions
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] plugin.google: Catch IO and OS Errors when reading search descriptions
- Date: Wed, 30 Sep 2009 21:54:33 +0000 (UTC)
commit ca216bb425e5294ceca172ee4cc84b8aeb4bc6de
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Wed Sep 30 23:40:05 2009 +0200
plugin.google: Catch IO and OS Errors when reading search descriptions
kupfer/plugin/google.py | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/kupfer/plugin/google.py b/kupfer/plugin/google.py
index 47595f6..efa6b6c 100644
--- a/kupfer/plugin/google.py
+++ b/kupfer/plugin/google.py
@@ -188,11 +188,14 @@ class OpenSearchSource (Source):
# files are unique by filename to allow override
visited_files = set()
for pdir in plugin_dirs:
- for f in os.listdir(pdir):
- if f in visited_files:
- continue
- parser.send(os.path.join(pdir, f))
- visited_files.add(f)
+ try:
+ for f in os.listdir(pdir):
+ if f in visited_files:
+ continue
+ parser.send(os.path.join(pdir, f))
+ visited_files.add(f)
+ except EnvironmentError, exc:
+ self.output_error(exc)
for s in searches:
yield SearchEngine(s, s["ShortName"])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]