def __refreshlist(self): result = dns.getalldomains(self.user) if result is False: print "false" pass else: if result['status']['code'] != '1': #pop a dialog to show errorp print result['status']['code'] else: self.__clear_ui(self.layout) self.__ui(result['domains'])