From b836ccbd5d044b9c2d42c3b3b080e6574f9be0b4 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Wed, 03 Oct 2012 06:28:46 +0000 Subject: Remote mount might process volume commands --- 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: -- cgit v0.9.1