From 0bc8fc6bf17e1a6db691241eb481aeb7a231a0b0 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 21 Nov 2012 01:14:12 +0100 Subject: [PATCH] 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. --- mopidy/frontends/mpd/protocol/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mopidy/frontends/mpd/protocol/__init__.py b/mopidy/frontends/mpd/protocol/__init__.py index ded65315..a8bdc2c7 100644 --- a/mopidy/frontends/mpd/protocol/__init__.py +++ b/mopidy/frontends/mpd/protocol/__init__.py @@ -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))