Example #1
0
 def get(self, path, params={}):
     url = urljoin(config.BASE_URL, "/connect/app/")
     url = urljoin(url, path)
     #print url
     data = XMLObject(connect(url, params, self.opener))
     self._update(data)
     return data
Example #2
0
 def get(self, path, params={}):
     url = urljoin(config.BASE_URL, "/connect/app/")
     url = urljoin(url, path)
     #print url
     data = XMLObject(connect(url, params,self.opener))
     self._update(data)
     return data
Example #3
0
 def get(self, path, params={}):
     url = urljoin(config.BASE_URL, "/connect/app/")
     url = urljoin(url, path)
     #print url
     xml = connect(url, params, self.opener)
     if config.DEBUG:
         with open("resource/" + self._loginId + path.replace('~/', '').replace('/', '_') + '.xml', 'w') as fp:
             fp.write(xml)
     data = re.sub("&(?!amp;)", "&", xml)
     self.last_xml = data
     try:
         data = XMLObject(data)
     except:
         if not self.ignore_error:
             print 'ERROR response info:', path
         return xml
     self._update(data)
     return data