diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2012-10-03 06:28:46 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2012-10-03 06:28:46 (GMT) |
commit | b836ccbd5d044b9c2d42c3b3b080e6574f9be0b4 (patch) | |
tree | 5d9961dcb3dbc1cdbf0ee122456076d5e7593297 | |
parent | 6712742e75aaef57a8777060918e6b974fa65e32 (diff) |
Remote mount might process volume commands
-rw-r--r-- | sugar_network/local/mounts.py | 3 | ||||
-rw-r--r-- | sugar_network/toolkit/http.py | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sugar_network/local/mounts.py b/sugar_network/local/mounts.py index 7a2c292..b88a2af 100644 --- a/sugar_network/local/mounts.py +++ b/sugar_network/local/mounts.py @@ -158,6 +158,9 @@ class _ProxyCommands(object): self._home_volume = home_mount def _proxy_call(self, request, response, super_call): + if 'document' not in request: + return super_call(request, response) + patch = {} result = None command = request['method'], request.get('cmd') diff --git a/sugar_network/toolkit/http.py b/sugar_network/toolkit/http.py index bb177da..3fc7259 100644 --- a/sugar_network/toolkit/http.py +++ b/sugar_network/toolkit/http.py @@ -153,11 +153,13 @@ class Client(object): def call(self, request, response=None): params = request.copy() method = params.pop('method') - document = params.pop('document') + document = params.pop('document') if 'document' in params else None guid = params.pop('guid') if 'guid' in params else None prop = params.pop('prop') if 'prop' in params else None - path = [document] + path = [] + if document: + path.append(document) if guid: path.append(guid) if prop: |