예제 #1
0
    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())
예제 #2
0
    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())
예제 #3
0
 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()
예제 #4
0
 def _exist_network(self):
     if not os.environ.get("NETWORK"):
         Pk = PackageKitBaseBackend("")
         Pk.error(ERROR_NO_NETWORK,"Not exist network conection")
예제 #5
0
 def _exist_network(self):
     if not os.environ.get("NETWORK"):
         Pk = PackageKitBaseBackend("")
         Pk.error(ERROR_NO_NETWORK, "Not exist network conection")