# HG changeset patch # User Pascal Volk # Date 1357410832 0 # Node ID de046a3b29a56476706f10d20cb004286cb9197a # Parent d3fd9bb0a5ea51b132e321dcfb527d44f9af5ae5 VMM: Post-2to3 fix. Use the re.ASCII flag for ASCII-only patterns. The local-part of an email address and Postfix configuration parameters may contain only ASCII characters. diff -r d3fd9bb0a5ea -r de046a3b29a5 VirtualMailManager/emailaddress.py --- a/VirtualMailManager/emailaddress.py Sat Jan 05 18:23:05 2013 +0000 +++ b/VirtualMailManager/emailaddress.py Sat Jan 05 18:33:52 2013 +0000 @@ -16,7 +16,7 @@ from VirtualMailManager.errors import DomainError, EmailAddressError as EAErr -RE_LOCALPART = re.compile(r"[^\w!#$%&'\*\+-\.\/=?^_`{\|}~]") +RE_LOCALPART = re.compile(r"[^\w!#$%&'\*\+-\.\/=?^_`{\|}~]", re.ASCII) _ = lambda msg: msg diff -r d3fd9bb0a5ea -r de046a3b29a5 VirtualMailManager/ext/postconf.py --- a/VirtualMailManager/ext/postconf.py Sat Jan 05 18:23:05 2013 +0000 +++ b/VirtualMailManager/ext/postconf.py Sat Jan 05 18:33:52 2013 +0000 @@ -25,8 +25,8 @@ class Postconf(object): """Wrapper class for Postfix's postconf.""" __slots__ = ('_bin', '_val') - _parameter_re = re.compile(r'^\w+$') - _variables_re = re.compile(r'\$\b\w+\b') + _parameter_re = re.compile(r'^\w+$', re.ASCII) + _variables_re = re.compile(r'\$\b\w+\b', re.ASCII) def __init__(self, postconf_bin): """Creates a new Postconf instance.