From 68f6ef230e78ac33fe23fe4ab0236ee6550b1113 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 4 Jul 2014 18:18:21 +0100 Subject: 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' --- scripts/do-release.py | 4 +--- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.1