Mercurial > piecrust2
comparison piecrust/uriutil.py @ 6:f5ca5c5bed85
More Python 3 fixes, modularization, and new unit tests.
| author | Ludovic Chabant <ludovic@chabant.com> |
|---|---|
| date | Sat, 16 Aug 2014 08:15:30 -0700 |
| parents | 474c9882decf |
| children | 30a42341cfa8 |
comparison
equal
deleted
inserted
replaced
| 5:474c9882decf | 6:f5ca5c5bed85 |
|---|---|
| 36 | 36 |
| 37 pagenum_pattern = re.compile(r'/(\d+)/?$') | 37 pagenum_pattern = re.compile(r'/(\d+)/?$') |
| 38 | 38 |
| 39 | 39 |
| 40 def parse_uri(routes, uri): | 40 def parse_uri(routes, uri): |
| 41 if string.find(uri, '..') >= 0: | 41 if uri.find('..') >= 0: |
| 42 raise UriError(uri) | 42 raise UriError(uri) |
| 43 | 43 |
| 44 page_num = 1 | 44 page_num = 1 |
| 45 match = pagenum_pattern.search(uri) | 45 match = pagenum_pattern.search(uri) |
| 46 if match is not None: | 46 if match is not None: |
