Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-11-03 15:34:17 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-11-03 15:34:17 (GMT)
commite748f756c0d433349421fe613809bf5c6912e1ea (patch)
tree05e4b74abd3de9c1ca1476b281993800848162c4
parentbce1c9fa216ba5a36e4abdeda465bb2eefd7641e (diff)
#4618: Make the shell service more resilient to failure.
-rw-r--r--NEWS2
-rw-r--r--services/shell/bundleregistry.py17
2 files changed, 15 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index b70388a..d5d4dbc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+* #4618: Make the shell service more resilient to failure. (tomeu)
+
Snapshot 39aca0154d
* Get bundle installation to work again. (marco)
diff --git a/services/shell/bundleregistry.py b/services/shell/bundleregistry.py
index cbf5464..8dd141c 100644
--- a/services/shell/bundleregistry.py
+++ b/services/shell/bundleregistry.py
@@ -15,6 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import os
+import logging
import gobject
@@ -85,14 +86,22 @@ class BundleRegistry(gobject.GObject):
for f in os.listdir(path):
if not f.endswith('.activity'):
continue
- bundle_dir = os.path.join(path, f)
- if os.path.isdir(bundle_dir):
- bundles[bundle_dir] = os.stat(bundle_dir).st_mtime
+ try:
+ bundle_dir = os.path.join(path, f)
+ if os.path.isdir(bundle_dir):
+ bundles[bundle_dir] = os.stat(bundle_dir).st_mtime
+ except Exception, e:
+ logging.error('Error while processing installed activity ' \
+ 'bundle: %s, %s, %s' % (f, e.__class__, e))
bundle_dirs = bundles.keys()
bundle_dirs.sort(lambda d1,d2: cmp(bundles[d1], bundles[d2]))
for dir in bundle_dirs:
- self.add_bundle(dir)
+ try:
+ self.add_bundle(dir)
+ except Exception, e:
+ logging.error('Error while processing installed activity ' \
+ 'bundle: %s, %s, %s' % (dir, e.__class__, e))
def add_bundle(self, bundle_path):
try: