summaryrefslogtreecommitdiff
path: root/morphlib/sysbranchdir.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-09-02 12:11:50 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-09-05 09:46:37 +0000
commite59906299a9f3bbbe316af9c288396d8424cd575 (patch)
treeb0c50bc5570f107cab9ce988cf9258e92fa88f20 /morphlib/sysbranchdir.py
parent8b29e93b2179145f67acc874493cf0bf863fe7a0 (diff)
downloadmorph-e59906299a9f3bbbe316af9c288396d8424cd575.tar.gz
sysbranchdir: simplify prefix / strip
There's a built-in function to do this.
Diffstat (limited to 'morphlib/sysbranchdir.py')
-rw-r--r--morphlib/sysbranchdir.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/morphlib/sysbranchdir.py b/morphlib/sysbranchdir.py
index 9ad1e2fd..0b3c859a 100644
--- a/morphlib/sysbranchdir.py
+++ b/morphlib/sysbranchdir.py
@@ -95,8 +95,7 @@ class SystemBranchDirectory(object):
# Remove anyleading slashes, or os.path.join below will only
# use the relative part (since it's absolute, not relative).
- while relative.startswith('/'):
- relative = relative[1:]
+ relative = relative.lstrip('/')
return os.path.join(self.root_directory, relative)