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:
parent
09d7279b6b
commit
0bc8fc6bf1
@ -56,7 +56,7 @@ def handle_request(pattern, auth_required=True):
|
|||||||
if match is not None:
|
if match is not None:
|
||||||
mpd_commands.add(
|
mpd_commands.add(
|
||||||
MpdCommand(name=match.group(), auth_required=auth_required))
|
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:
|
if compiled_pattern in request_handlers:
|
||||||
raise ValueError('Tried to redefine handler for %s with %s' % (
|
raise ValueError('Tried to redefine handler for %s with %s' % (
|
||||||
pattern, func))
|
pattern, func))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user