Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 559366 | Differences between
and this patch

Collapse All | Expand All

(-)pyspf-2.0.11-orig/spf.py (+8 lines)
Lines 401-406 Link Here
401
            self.iplist = []
401
            self.iplist = []
402
            ip6 = True
402
            ip6 = True
403
        else:
403
        else:
404
            if sys.version_info.major < 3:
405
                if isinstance(i, str):
406
                   i = i.decode('ascii')
404
            try:
407
            try:
405
                self.ipaddr = ipaddress.ip_address(i)
408
                self.ipaddr = ipaddress.ip_address(i)
406
            except AttributeError:
409
            except AttributeError:
Lines 1345-1350 Link Here
1345
        True
1348
        True
1346
        """
1349
        """
1347
        try:
1350
        try:
1351
            if sys.version_info.major < 3:
1352
                for idx, ip in enumerate(ipaddrs):
1353
                    if isinstance(ipaddrs[idx], str):
1354
                        ipaddrs[idx] = ipaddrs[idx].decode('ascii')
1355
1348
            for netwrk in [ipaddress.ip_network(ip) for ip in ipaddrs]:
1356
            for netwrk in [ipaddress.ip_network(ip) for ip in ipaddrs]:
1349
                network = netwrk.supernet(new_prefix=n)
1357
                network = netwrk.supernet(new_prefix=n)
1350
                if isinstance(self.iplist, bool):
1358
                if isinstance(self.iplist, bool):

Return to bug 559366