Skip to content

Commit

Permalink
Merge pull request #2 from idealatom/master
Browse files Browse the repository at this point in the history
find_urls and index url '/'
  • Loading branch information
peterbe committed Mar 12, 2013
2 parents 8d18754 + 7403b64 commit 9521cb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fancy_cache/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def _urls_to_regexes(urls):
for each in urls:
parts = each.split('*')
if len(parts) == 1:
regexes.append(re.compile(re.escape(parts[0])))
regexes.append(re.compile('^%s$' % re.escape(parts[0])))
else:
_re = '.*'.join(re.escape(x) for x in parts)
regexes.append(re.compile(_re))
regexes.append(re.compile('^%s$' % _re))
return regexes


Expand Down

0 comments on commit 9521cb0

Please sign in to comment.