CarlEdman/godaddy-ddns

Interesting Error

Closed this issue · 1 comments

I am now getting this error after going to Centos7

[root@padin ~]# /root/godaddy_updater.py %/root/godaddy-ddns.config

Traceback (most recent call last):
File "/root/godaddy_updater.py", line 141, in
main()
File "/root/godaddy_updater.py", line 84, in main
with urlopen("http://ipv4.icanhazip.com/") as f: resp=f.read()
AttributeError: addinfourl instance has no attribute 'exit'
[root@padin ~]#

That is probably an effect of the version of python used. In Python 3, urlopen() returns a context handler which can be used with 'with'. In at least some versions of Python 2, it doesn't. For a discussion with respect to 2.7 only, see here.