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 <gavinmak@google.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
changes/77/4375877/2
Joanna Wang 2 years ago committed by LUCI CQ
parent 36b40f68d4
commit df528a9d7a

@ -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

Loading…
Cancel
Save