[fuchsia_cipd_roller] Fix rstrip bug for roller name
rstrip does not simply strip a suffix by substring;
it strips the given characters from the right. This
causes chromium-stable-roller to appear as chromium-stab
(the l and e are also removed).
Test: 'chromium-stable-roller'.rstrip('-roller') ->
'chromium-stab'
Bug: 43128
Change-Id: Ieb56d16e400ae395bc7163e63e8da7764c282d51
diff --git a/recipes/fuchsia_cipd_roller.py b/recipes/fuchsia_cipd_roller.py
index 7097f91..fa6ebd7 100644
--- a/recipes/fuchsia_cipd_roller.py
+++ b/recipes/fuchsia_cipd_roller.py
@@ -293,9 +293,8 @@
exact_packages = sorted(exact_packages)
packages_with_urls = _append_urls(exact_packages, old_version, version)
- roller_name = api.buildbucket.builder_name.rstrip('-roller')
message = COMMIT_MESSAGE.format(
- roller=roller_name,
+ roller=api.buildbucket.builder_name.replace('-roller', ''),
packages='\n'.join(packages_with_urls),
old_version=old_version,
version=version,