summaryrefslogtreecommitdiff
path: root/morphlib/sysbranchdir.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-09-16 17:41:27 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-09-16 17:41:27 +0000
commit86209e1f346fd24119f31872b589a70533523585 (patch)
treeff5ca25e6309efb00a95c34dbee4b53c29ee0c96 /morphlib/sysbranchdir.py
parent86d3f0110602fb8eea1d00e65abb3025760c6232 (diff)
parent1bedfa7749300da167808b837d2a8968df43eeb3 (diff)
downloadmorph-86209e1f346fd24119f31872b589a70533523585.tar.gz
Merge branch 'baserock/richardmaw/S8717/refactor-petrify-v4'
Reviewed-by: Lars Wirzenius Reviewed-by: Daniel Silverstone Daniel gave his +1 with the caveat that he would like tests for petrifying a system branch other than master.
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)