diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-07-04 18:18:21 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-07-04 18:18:21 +0100 |
commit | 68f6ef230e78ac33fe23fe4ab0236ee6550b1113 (patch) | |
tree | 6d1f7888eb562554f44df4d4af444422e3f2020e /scripts | |
parent | 4244ff8472b95ab52afea84d321d3da414c4727e (diff) | |
download | definitions-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'
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/do-release.py | 4 |
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 |