示例#1
0
文件: gametag.py 项目: dahool/regeer
 def render(self, context):
     from gameutils import ip_to_decimal, ip_find_tupple
     lista = self.lista.resolve(context)
     value = self.value.resolve(context)
     if value and lista and ip_find_tupple(lista, ip_to_decimal(value)):
         return self.nodelist_true.render(context)
     else:
         return self.nodelist_false.render(context)    
示例#2
0
文件: banlist.py 项目: dahool/regeer
 def exists(self, ip):
     lista = self.get_list()
     elem = ip_to_decimal(ip)
     return ip_find_tupple(lista, elem) is not None