#442 closed defect (fixed)
After installing activity there are two icons in list and favorites view
Reported by: | erikos | Owned by: | erikos |
---|---|---|---|
Priority: | Immediate | Milestone: | |
Component: | Sugar | Version: | Git as of bugdate |
Severity: | Blocker | Keywords: | |
Cc: | tomeu | Distribution/OS: | Unspecified |
Bug Status: | Resolved |
Description
I installed using Browse. There is only one activity in ~/Activities I know that Sascha reported the same issue on irc.
Attachments (1)
Change History (10)
comment:1 Changed 14 years ago by erikos
- Owner changed from marcopg to erikos
- Status changed from new to assigned
comment:2 Changed 14 years ago by erikos
- Cc tomeu added
comment:3 Changed 14 years ago by erikos
Ok, I guess a regression from this one: http://git.sugarlabs.org/projects/sugar/repos/mainline/commits/0f62a26ec206d0a2756326f5a71646079ee27720
comment:4 Changed 14 years ago by erikos
- Keywords r? added
This would do it.
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())
comment:5 Changed 14 years ago by erikos
committed to get it in the snapshot: http://git.sugarlabs.org/projects/sugar/repos/mainline/commits/ae381ce5b6be7f23602468e1a38fb9640a2af832
I leave it open for tomeu to comment if he likes the fix.
comment:6 Changed 14 years ago by tomeu
Pushed a similar fix that doesn't need to access the disk: http://git.sugarlabs.org/projects/sugar/repos/mainline/commits/92049568
comment:7 Changed 14 years ago by erikos
- Keywords r? removed
comment:8 Changed 14 years ago by erikos
- Bug Status changed from Assigned to Resolved
- Resolution set to fixed
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.
The add_bundle method in the bundleregistry get called twice - even though only one datastore entry is created. Actually the second time it gets called - it does so because our file monitor does report a change file_monitor_changed_cb