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.
This should be fixed in pyspf (which I'll work on).
--- spf.py.orig 2012-06-14 19:56:11.568543789 +0000
return [''.join( s.decode( "ascii" ) for s in a)
for a in self.dns( domainname, 'TXT')]
raise PermError( 'Non-ascii character in SPF TXT record.')
return [''.join( s.decode( "ascii" ) for s in a)
for a in self.dns( domainname, 'SPF')]
raise PermError( 'Non-ascii character in SPF record.')
+++ spf.py 2012-06-14 19:59:03.124546459 +0000
@@ -1129,7 +1129,7 @@
try:
- except UnicodeEncodeError:
+ except UnicodeError:
return []
def dns_99(self, domainname):
@@ -1138,7 +1138,7 @@
try:
- except UnicodeEncodeError:
+ except UnicodeError:
return []
is the fix for anyone that wants to patch it locally in the mean time.