[fix] fix UnboundLocalError on ConnectionError

While connecting to ip6.yunohost.org, new_ip6 was not populated if exception.
This commit is contained in:
Jocelyn Delande 2015-09-27 01:14:42 +02:00 committed by kload
parent 0e8366adb5
commit e91f3797a5

View file

@ -118,6 +118,7 @@ def dyndns_update(dyn_host="dynhost.yunohost.org", domain=None, key=None, ip=Non
# IPv6
if ipv6 is None:
new_ipv6 = None
try:
new_ipv6 = requests.get('http://ip6.yunohost.org').text
except ConnectionError: