def __init__(self, args): PackageKitBaseBackend.__init__(self, args) # conary configurations conary = conarypk.ConaryPk() self.cfg = conary.cfg self.client = conary.cli self.conary = conary self.xmlcache = XMLCache(self.conary.get_labels())
def _fetchXML(self ): con = ConaryPk() labels = con.get_labels_from_config() for i in labels: label = i + '.xml' filename = self.xml_path + label wwwfile = self.server + label try: wget = url.urlopen( wwwfile ) except: Pk = PackageKitBaseBackend("") Pk.error(ERROR_NO_CACHE," %s can not open" % wwwfile) openfile = open( filename ,'w') openfile.writelines(wget.readlines()) openfile.close()
def _exist_network(self): if not os.environ.get("NETWORK"): Pk = PackageKitBaseBackend("") Pk.error(ERROR_NO_NETWORK,"Not exist network conection")
def _exist_network(self): if not os.environ.get("NETWORK"): Pk = PackageKitBaseBackend("") Pk.error(ERROR_NO_NETWORK, "Not exist network conection")