Decode external IP address to string
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 15 Jan 2020 16:27:01 +0000 (17:27 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 15 Jan 2020 16:27:01 +0000 (17:27 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
src/ddns/system.py

index 299ed07..c2dc430 100644 (file)
@@ -105,11 +105,11 @@ class DDNSSystem(object):
                if not response.code == 200:
                        return
 
-               match = re.search(r"^Your IP address is: (.*)$", response.read())
+               match = re.search(b"^Your IP address is: (.*)$", response.read())
                if match is None:
                        return
 
-               return match.group(1)
+               return match.group(1).decode()
 
        def guess_external_ip_address(self, family, **kwargs):
                if family == "ipv6":