Beispiel #1
0
 def _fetchXML(self):
     log.info("Updating XMLCache for label %s" % self.label)
     if self.label in self.pregenerated_XML_labels:
         wwwfile = "%s/%s.xml" % (self.server, self.label)
         try:
             wget = url.urlopen(wwwfile)
             openfile = open(self.xml_file, 'w')
             openfile.write(wget.read())
             openfile.close()
         except:
             self.pk.error(ERROR_NO_NETWORK,"Failed to fetch %s." % wwwfile)
     else:
         generateXML.init(self.label, self.xml_file)
 def _fetchXML(self):
     log.info("Updating XMLCache for label %s" % self.label)
     if self.label in self.pregenerated_XML_labels:
         wwwfile = "%s/%s.xml" % (self.server, self.label)
         try:
             wget = url.urlopen(wwwfile)
             openfile = open(self.xml_file, 'w')
             openfile.write(wget.read())
             openfile.close()
         except:
             self.pk.error(ERROR_NO_NETWORK,
                           "Failed to fetch %s." % wwwfile)
     else:
         generateXML.init(self.label, self.xml_file)
Beispiel #3
0
 def _fetchXML(self, label):
     log.info("Updating XMLCache for label %s" % label)
     filename = label + '.xml'
     filepath = self.xml_path + filename
     if label in self.pregenerated_XML_labels:
         wwwfile = self.server + filename
         try:
             wget = url.urlopen( wwwfile )
             openfile = open(filepath,'w')
             openfile.writelines(wget.readlines())
             openfile.close()
         except:
             self.pk.error(ERROR_NO_NETWORK,"%s can not open" % wwwfile)
     else:
         generateXML.init(label,filepath,self.conarypk)
Beispiel #4
0
 def _fetchXML(self, label):
     log.info("Updating XMLCache for label %s" % label)
     filename = label + '.xml'
     filepath = self.xml_path + filename
     if label in self.pregenerated_XML_labels:
         wwwfile = self.server + filename
         try:
             wget = url.urlopen(wwwfile)
             openfile = open(filepath, 'w')
             openfile.writelines(wget.readlines())
             openfile.close()
         except:
             self.pk.error(ERROR_NO_NETWORK, "%s can not open" % wwwfile)
     else:
         generateXML.init(label, filepath, self.conarypk)