Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-02-27 11:26:45 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-02-27 11:26:45 (GMT)
commitae381ce5b6be7f23602468e1a38fb9640a2af832 (patch)
treeb888e25e112d37492d8cc6b1ea4e059015381205 /src
parentd50a41165ec73b0651ff282fb860a68076d49da4 (diff)
Don't add_bundle on activity dir change when installed already #442
regression from #235
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/model/bundleregistry.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py
index 6a05734..62ac6e2 100644
--- a/src/jarabe/model/bundleregistry.py
+++ b/src/jarabe/model/bundleregistry.py
@@ -72,7 +72,15 @@ class BundleRegistry(gobject.GObject):
if not one_file.get_path().endswith('.activity'):
return
if event_type == gio.FILE_MONITOR_EVENT_CREATED:
- self.add_bundle(one_file.get_path())
+ try:
+ bundle = ActivityBundle(one_file.get_path())
+ except MalformedBundleException:
+ logging.error('Error loading bundle %r:\n%s' % (
+ one_file.get_path(),
+ ''.join(traceback.format_exception(*sys.exc_info()))))
+ return
+ if not self.is_installed(bundle):
+ self.add_bundle(one_file.get_path())
elif event_type == gio.FILE_MONITOR_EVENT_DELETED:
self.remove_bundle(one_file.get_path())