level12 / open4-dydns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A failed DNS lookup should remove the rule, not crash the script

rsyring opened this issue · comments

ERROR - resolving hostname bladams.ddns.net threw an exception
Traceback (most recent call last):
  File "/root/open4-dydns-src-git/open4-dydns", line 143, in main
    host_rule = HostRule(host_name_str, section)
  File "/root/open4-dydns-src-git/open4-dydns", line 69, in __init__
    self.getip()
  File "/root/open4-dydns-src-git/open4-dydns", line 72, in getip
    self.current_ip = socket.gethostbyname(self.name)
socket.gaierror: [Errno -2] Name or service not known

Fixed by referenced commit.