def _request(self, request, origin=None, encode=True):
    url = (((origin or self.origin) + '/') + '/'.join(((encode and self._encode(request)) or request)))
    try:
        try:
            usock = urllib2.urlopen(url, None, 200)
        except TypeError:
            usock = urllib2.urlopen(url, None)
        response = usock.read()
        usock.close()
        return json.loads(response)
    except:
        return None
def _request(self, request, origin=None, encode=True):
    url = (((origin or self.origin) + '/') + '/'.join(((encode and self._encode(request)) or request)))
    try:
        try:
            usock = urllib2.urlopen(url, None, 200)
        except TypeError:
            usock = urllib2.urlopen(url, None)
        response = usock.read()
        usock.close()
        return json.loads(response)
    except:
        return None