Source

gett-cli / gett.py

Diff from to
 
     try:
         resp = urlopen(req)
+        logger.debug("got %d response", resp.status)
         raw = resp.read()
     except HTTPError as ex:
         resp = ex
+        logger.debug("got %d error", resp.code) # urllib sucks
         raw = ex.read()
 
     raw = raw.decode('utf-8')
         print("Error: unable to decode JSON: %s" % raw)
         raise APIError("Unable to decode JSON: %s", raw)
 
-    logger.debug("response (%d):\n%s", resp.status, pprint.pformat(result))
+    logger.debug("json:\n%s", pprint.pformat(result))
 
     if 'error' in result:
         raise APIError(result['error'])