diff options
-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: |