def dequeue(self,*args,**kwargs): try : retVal = method(self,*args,**kwargs) if utils.comm_queue.__len__() != 0: xmlObj = utils.comm_queue.pop() #convert the XML object into serviceDict serviceDict = xmltodict(xmlObj) return retVal except : pass
def xml2dict(conf_file): confile = open(conf_file,'r') conf_xml = confile.read() confile.close() dict = xmltodict(conf_xml,'utf-8') return dict