Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 410812 Details for
Bug 559364
mail-filter/pypolicyd-spf: conflict with ipaddress module in python < 3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ipaddress.patch
ipaddress.patch (text/plain), 1.06 KB, created by
Robert Trace
on 2015-09-02 01:19:29 UTC
(
hide
)
Description:
ipaddress.patch
Filename:
MIME Type:
Creator:
Robert Trace
Created:
2015-09-02 01:19:29 UTC
Size:
1.06 KB
patch
obsolete
>--- pypolicyd-spf-1.3.1/policyd-spf.original 2014-06-04 15:08:50.000000000 +1000 >+++ pypolicyd-spf-1.3.1/policyd-spf 2015-06-18 14:28:55.300135301 +1000 >@@ -38,10 +38,7 @@ > if int(micro) < 7: > raise ImportError("At least pyspf 2.0.7 is required.") > import policydspfsupp >-try: >- import ipaddress >-except ImportError: >- import ipaddr as ipaddress >+import ipaddress > try: > import authres > except: >@@ -54,6 +51,12 @@ > def _cidrmatch(ip, netwrk): > """Match connect IP against a CIDR network of other IP addresses.""" > >+ if sys.version_info.major < 3: >+ if isinstance(ip, str): >+ ip = ip.decode('ascii') >+ if isinstance(netwrk, str): >+ netwrk = netwrk.decode('ascii') >+ > try: > address = ipaddress.ip_address(ip) > except AttributeError: >@@ -65,6 +68,10 @@ > return network.__contains__(address) > > def _get_rdns_lookup(ip): >+ if sys.version_info.major < 3: >+ if isinstance(ip, str): >+ ip = ip.decode('ascii') >+ > try: > address = ipaddress.ip_address(ip) > except AttributeError:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 559364
:
410806
|
410808
|
410810
| 410812