def get_ip(self, text):
     if common.match_ipv4_address(text) is not None:
         return common.match_ipv4_address(text)
     else:
         if common.match_ipv6_address(text) is not None:
             return common.match_ipv6_address(text)
     return None
Пример #2
0
def get_ip(text):
	if common.match_ipv4_address(text) != None:
		return common.match_ipv4_address(text)
	else:
		if common.match_ipv6_address(text) != None:
			return common.match_ipv6_address(text)
	return None