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/01/10 19:08:21 UTC

[28/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/8053a803
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8053a803
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8053a803

Branch: refs/heads/cj/4691
Commit: 8053a8032bb077f632e30fae7231ad7abb56225e
Parents: d7b4de6
Author: Cory Johns <jo...@geek.net>
Authored: Wed Dec 5 21:53:24 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Thu Jan 10 16:27:14 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/8053a803/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 6ab590a..11e78b7 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: