Comment 6 for bug 832480

Revision history for this message
Scott Kitterman (kitterman) wrote :

This should be fixed in pyspf (which I'll work on).

--- spf.py.orig 2012-06-14 19:56:11.568543789 +0000
+++ spf.py 2012-06-14 19:59:03.124546459 +0000
@@ -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 []

is the fix for anyone that wants to patch it locally in the mean time.