From 1066c79b56cd4f9ee421cd852685cac953402154 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Wed, 11 Dec 2013 16:02:06 -0800 Subject: [PATCH] simplify path type coercion in MatchQuery (#470) --- beets/library.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/beets/library.py b/beets/library.py index 062114f5d..dab48bce5 100644 --- a/beets/library.py +++ b/beets/library.py @@ -1027,10 +1027,7 @@ class MatchQuery(FieldQuery): def col_clause(self): pattern = self.pattern if self.field == 'path': - if isinstance(pattern, unicode): - pattern = bytestring_path(pattern) - if isinstance(pattern, str): - pattern = buffer(pattern) + pattern = buffer(bytestring_path(pattern)) return self.field + " = ?", [pattern] # We override the "raw" version here as a special case because we