diff options
| -rw-r--r-- | CHANGES.txt | 7 | ||||
| -rw-r--r-- | repoze/bfg/traversal.py | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index fd02f07ea..cb9453b43 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,13 @@ Bug Fixes ``bfg_alchemy`` application template's ``MyApp`` model was an integer. This was incorrect. It is now a string. +Internal +-------- + +- Replace the statement ``path = path.rstrip('/').lstrip('/')`` with + the simpler ``path = path.strip('/')`` in the + ``repoze.bfg.traversal.traversal_path`` function. + 1.2 (2010-02-10) ================ diff --git a/repoze/bfg/traversal.py b/repoze/bfg/traversal.py index bce239d3f..cf2a808e8 100644 --- a/repoze/bfg/traversal.py +++ b/repoze/bfg/traversal.py @@ -421,8 +421,7 @@ def traversal_path(path): their own traversal machinery, as opposed to users writing applications in :mod:`repoze.bfg`. """ - path = path.rstrip('/') - path = path.lstrip('/') + path = path.strip('/') clean = [] for segment in path.split('/'): segment = urllib.unquote(segment) # deal with spaces in path segment |
