From df528a9d7a40d52f0cf0b61cf21e1e298f67860a Mon Sep 17 00:00:00 2001 From: Joanna Wang Date: Mon, 27 Mar 2023 23:03:35 +0000 Subject: [PATCH] Fix multiple endswith values. Bug: 1421776 Change-Id: I6ca45a7aa086da4356302a7b9aa588bf60888129 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4375877 Reviewed-by: Gavin Mak Auto-Submit: Joanna Wang Commit-Queue: Joanna Wang --- recipes/recipe_modules/bot_update/resources/bot_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index 31d25a542..3e0766cbb 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -356,7 +356,7 @@ def remove(target, cleanup_dir): os.rename(target, dest) except OSError as os_e: print('Error renaming %s to %s: %s' % (target, dest, str(os_e))) - if not target.endswith('/.', '\.'): + if not target.endswith(('/.', '\.')): raise # Because the solutions name is '.', we might be in a bot # directory that is locked to prevent renaming. Instead