Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2012-08-15 22:25:09 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2012-08-15 22:25:09 (GMT)
commitff3faf969c4cf3079eb339b563101cfb609bb3cb (patch)
treea7f3bf11d364aca013fdc3a328869b870d610a5d
parent67483e134c7b255988f8dfd56c5c21767ffb05f3 (diff)
Finish context checkin before signalizing by setting keep_impl
-rw-r--r--sugar_network/local/activities.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/sugar_network/local/activities.py b/sugar_network/local/activities.py
index 20dcf9c..4e488d4 100644
--- a/sugar_network/local/activities.py
+++ b/sugar_network/local/activities.py
@@ -137,6 +137,17 @@ class _Inotify(Inotify):
return
context = spec['Activity', 'bundle_id']
+
+ context_path = _ensure_context_path(context, hashed_path)
+ if lexists(context_path):
+ os.unlink(context_path)
+ os.symlink(impl_path, context_path)
+
+ if lexists(checkin_path):
+ os.unlink(checkin_path)
+ local.ensure_path(checkin_path)
+ os.symlink(relpath(context_path, dirname(checkin_path)), checkin_path)
+
if self._contexts.exists(context):
self._contexts.update(context, {'keep_impl': 2})
else:
@@ -159,16 +170,6 @@ class _Inotify(Inotify):
self._checkin_activity(spec)
- context_path = _ensure_context_path(context, hashed_path)
- if lexists(context_path):
- os.unlink(context_path)
- os.symlink(impl_path, context_path)
-
- if lexists(checkin_path):
- os.unlink(checkin_path)
- local.ensure_path(checkin_path)
- os.symlink(relpath(context_path, dirname(checkin_path)), checkin_path)
-
def found_mimetypes(self, impl_path):
hashed_path, __ = _checkin_path(impl_path)
src_path = join(impl_path, 'activity', 'mimetypes.xml')