Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions mockredis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ def keys(self, pattern='*'):
pass

# Make regex out of glob styled pattern.
regex = fnmatch.translate(pattern)
regex = re.compile(re.sub(r'(^|[^\\])\.', r'\1[^/]', regex))
regex = re.compile(fnmatch.translate(pattern))

# Find every key that matches the pattern
return [key for key in self.redis.keys() if regex.match(key.decode('utf-8'))]
Expand Down