You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/02/06 16:42:52 UTC

[7/50] git commit: [#4691] Fixed IndexError in get_path

[#4691] Fixed IndexError in get_path

Signed-off-by: Cory Johns <jo...@geek.net>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/0e77a202
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0e77a202
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0e77a202

Branch: refs/heads/cj/4691
Commit: 0e77a202c7777535b71f975bd96a58e4d98c3da0
Parents: 6cf078d
Author: Cory Johns <jo...@geek.net>
Authored: Wed Dec 5 21:53:24 2012 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Feb 5 20:22:50 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/repo.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e77a202/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 3d456b1..8eb23d9 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -343,7 +343,7 @@ class Commit(RepoObject):
         return copied
 
     def get_path(self, path):
-        if path[0] == '/': path = path[1:]
+        path = path.lstrip('/')
         parts = path.split('/')
         cur = self.tree
         for part in parts: