Browse Source

Return host if it's an ip ..

tags/v0.2.0
Mike Campbell 8 years ago
parent
commit
e3cace7a49
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      _states/ufw.py

+ 1
- 1
_states/ufw.py View File

def _resolve(host): def _resolve(host):
# let's just see if it starts with a number or a colon, for simplicity # let's just see if it starts with a number or a colon, for simplicity
if re.match(r'^[0-9:]', host): if re.match(r'^[0-9:]', host):
return
return host


return socket.gethostbyname(host) return socket.gethostbyname(host)



Loading…
Cancel
Save