def _remote(self, response, msg_type=None):
    # print 'RESPONSE: %s' % response
    if msg_type is not None:
      try:
        return message_from_json(msg_type, response)
      except AttributeError, e:
        print 'AttributeError decoding json: %s\n\nRESPONSE: %s' % (e, response)
      return msg_type()
    else:
      return dict(
        headers=dumps({}), body=response)
dataset/ETHPy150Open gregorynicholas/flask-github/flask_github/github.py/Github._remote/original