diff options
Diffstat (limited to 'sugar-network')
-rwxr-xr-x | sugar-network | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sugar-network b/sugar-network index e2f2856..831939b 100755 --- a/sugar-network +++ b/sugar-network @@ -70,6 +70,13 @@ class Application(application.Application): self._call('GET', None) def _call(self, method, content=None): + if content: + try: + content = json.loads(content) + except Exception, error: + printf.info('Cannot parse JSON from stdin: %s', error) + return + request = Request(method=method) request.content = content response = ad.Response() |