Esempio n. 1
0
 def call(self, name, args):
     url = self.url + call_to_url_path(name, args)
     u = urllib2.urlopen(url)
     okay, res = deserialize(u.read())
     if okay:
         return res
     try:
         exc = getattr(exceptions, res.name)
         raise exc(res.value)
     except AttributeError:  # One of res.name, res.value, or the getattr
         raise res
Esempio n. 2
0
 def call(self, name, args):
     url = self.url + call_to_url_path(name, args)
     u = urllib2.urlopen(url)
     okay, res = deserialize(u.read())
     if okay:
         return res
     try:
         exc = getattr(exceptions, res.name)
         raise exc(res.value)
     except AttributeError:  # One of res.name, res.value, or the getattr
         raise res
Esempio n. 3
0
def url_path_to_call(path):
    name, args = deserialize(path.decode("base64"))
    return name, args
Esempio n. 4
0
def url_path_to_call(path):
    name, args = deserialize(path.decode("base64"))
    return name, args