mpd: Interpret regexp groups with unicode semantics

Compiling the regexpes with either re.UNICODE or re.LOCALE both seems to fix
the mystical failure of test_listplaylistinfo.
This commit is contained in:
Stein Magnus Jodal 2012-11-21 01:14:12 +01:00
parent 09d7279b6b
commit 0bc8fc6bf1

View File

@ -56,7 +56,7 @@ def handle_request(pattern, auth_required=True):
if match is not None:
mpd_commands.add(
MpdCommand(name=match.group(), auth_required=auth_required))
compiled_pattern = re.compile(pattern)
compiled_pattern = re.compile(pattern, flags=re.UNICODE)
if compiled_pattern in request_handlers:
raise ValueError('Tried to redefine handler for %s with %s' % (
pattern, func))