def connect(self): result = {} try: result = jTool.fetchUrl(self.host) result = eval(result) if result['status'] != 'ok': print 'Fail to connect Server:'+self.host return False print self.host +':'+ result['msg'] return True except: print 'Fail to connect Server:'+self.host return False
def getMyTask(self, post_data_dic): result = jTool.fetchUrl(self.host, post_data_dic, 'post') return result