diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2013-10-03 03:14:39 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2013-10-03 03:14:39 (GMT) |
commit | df67cfa72459592cc1888b78a94347e88f601d69 (patch) | |
tree | 1811d5b7131bfe76bc84684e023c1317eabfd4ff /sugar_network/client | |
parent | c362ec6b35df570fba4306c6463325030cdb98ba (diff) |
Local api command to get cloned path
Diffstat (limited to 'sugar_network/client')
-rw-r--r-- | sugar_network/client/implementations.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sugar_network/client/implementations.py b/sugar_network/client/implementations.py index 4413c42..b993b3e 100644 --- a/sugar_network/client/implementations.py +++ b/sugar_network/client/implementations.py @@ -53,6 +53,13 @@ class Routes(object): def invalidate_solutions(self, mtime): self._node_mtime = mtime + @route('GET', ['context', None], cmd='path') + def path(self, request): + clone_path = self._volume['context'].path(request.guid, '.clone') + enforce(exists(clone_path), http.NotFound) + clone_impl = basename(os.readlink(clone_path)) + return self._volume['implementation'].path(clone_impl, 'data') + @route('GET', ['context', None], cmd='launch', arguments={'args': list}, mime_type='text/event-stream') def launch(self, request, no_spawn): |