Chris McDonough
2010-04-07 bcd7816a420e113509e3e6fde59b3ed0d7a0c746
- Replace the statement ``path = path.rstrip('/').lstrip('/')`` with
the simpler ``path = path.strip('/')`` in the
``repoze.bfg.traversal.traversal_path`` function.


2 files modified
10 ■■■■ changed files
CHANGES.txt 7 ●●●●● patch | view | raw | blame | history
repoze/bfg/traversal.py 3 ●●●● patch | view | raw | blame | history
CHANGES.txt
@@ -11,6 +11,13 @@
  ``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)
================
repoze/bfg/traversal.py
@@ -421,8 +421,7 @@
              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