summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-07-04 18:18:21 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-07-04 18:18:21 +0100
commit68f6ef230e78ac33fe23fe4ab0236ee6550b1113 (patch)
tree6d1f7888eb562554f44df4d4af444422e3f2020e
parent4244ff8472b95ab52afea84d321d3da414c4727e (diff)
downloaddefinitions-68f6ef230e78ac33fe23fe4ab0236ee6550b1113.tar.gz
do-release: Make use of str.rstrip()
This was a review comment from Richard Maw which I forgot to include before merging branch 'sam/auto-release'
-rw-r--r--scripts/do-release.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/do-release.py b/scripts/do-release.py
index 5c4fff04..239e7085 100644
--- a/scripts/do-release.py
+++ b/scripts/do-release.py
@@ -499,9 +499,7 @@ class Upload(object):
return os.path.join(new_parent, os.path.basename(path))
def parent_dir(self, path):
- if path.endswith('/'):
- path = path[:-1]
- return os.path.dirname(path)
+ return os.path.dirname(path.rstrip('/'))
def make_images_public(self, image_files):
server = config.images_server