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:
def check_address(self, address):
if address == "*":
return True
if Resource.SIMPLE_ADDRESS.match(address):
return True
try:
if socket.inet_pton(socket.AF_INET, address):
return True
......@@ -77,6 +71,12 @@ class Resource:
except OSError:
pass
if address == "*":
return True
if Resource.SIMPLE_ADDRESS.match(address):
return True
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