Commit eee97532 authored by Robin Obůrka's avatar Robin Obůrka

network: Change order of check rules

parent 46bf56ac
...@@ -59,12 +59,6 @@ class Resource: ...@@ -59,12 +59,6 @@ class Resource:
def check_address(self, address): def check_address(self, address):
if address == "*":
return True
if Resource.SIMPLE_ADDRESS.match(address):
return True
try: try:
if socket.inet_pton(socket.AF_INET, address): if socket.inet_pton(socket.AF_INET, address):
return True return True
...@@ -77,6 +71,12 @@ class Resource: ...@@ -77,6 +71,12 @@ class Resource:
except OSError: except OSError:
pass pass
if address == "*":
return True
if Resource.SIMPLE_ADDRESS.match(address):
return True
return False return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment