From c45754b1a3d334769a9acdc09453e11b2e6edd6a Mon Sep 17 00:00:00 2001 From: brent s Date: Fri, 15 May 2020 01:53:37 -0400 Subject: [PATCH] ensure we update if no cached IPs --- utils/he_ipv6/tunnelbroker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/he_ipv6/tunnelbroker.py b/utils/he_ipv6/tunnelbroker.py index ddeabb1..8f9b899 100644 --- a/utils/he_ipv6/tunnelbroker.py +++ b/utils/he_ipv6/tunnelbroker.py @@ -65,6 +65,8 @@ class TunnelBroker(object): chk_tuple = (datetime.datetime.utcnow(), self.my_ip) if len(self.cached_ips) >= 1 and self.my_ip.str != self.cached_ips[-1][1].str: self.needs_update = True + elif len(self.cached_ips) == 0: + self.needs_update = True if self.needs_update: self.cached_ips.append(chk_tuple) with open(self.ip_cache, 'w') as fh: