[Python-modules-commits] r22468 - in packages/pyspf/trunk/debian/patches (catch_unicode_spf)

kitterman at users.alioth.debian.org kitterman at users.alioth.debian.org
Sat Jul 28 19:08:42 UTC 2012


    Date: Saturday, July 28, 2012 @ 19:08:41
  Author: kitterman
Revision: 22468

Add missing patch from last upload to svn.

Added:
  packages/pyspf/trunk/debian/patches/catch_unicode_spf

Added: packages/pyspf/trunk/debian/patches/catch_unicode_spf
===================================================================
--- packages/pyspf/trunk/debian/patches/catch_unicode_spf	                        (rev 0)
+++ packages/pyspf/trunk/debian/patches/catch_unicode_spf	2012-07-28 19:08:41 UTC (rev 22468)
@@ -0,0 +1,24 @@
+See https://bugs.launchpad.net/pypolicyd-spf/+bug/832480 for a discussion.
+Fix already committed upstream.
+Index: pyspf-2.0.7/spf.py
+===================================================================
+--- pyspf-2.0.7.orig/spf.py	2012-02-28 09:56:26.394745366 -0500
++++ pyspf-2.0.7/spf.py	2012-06-14 16:12:13.748558764 -0400
+@@ -1129,7 +1129,7 @@
+             try:
+                 return [''.join(s.decode("ascii") for s in a)
+                     for a in self.dns(domainname, 'TXT')]
+-            except UnicodeEncodeError:
++            except UnicodeError:
+                 raise PermError('Non-ascii character in SPF TXT record.')
+         return []
+     def dns_99(self, domainname):
+@@ -1138,7 +1138,7 @@
+             try:
+                 return [''.join(s.decode("ascii") for s in a)
+                     for a in self.dns(domainname, 'SPF')]
+-            except UnicodeEncodeError:
++            except UnicodeError:
+                 raise PermError('Non-ascii character in SPF record.')
+         return []
+ 




More information about the Python-modules-commits mailing list