Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1783)

Unified Diff: appengine/swarming/tools/start_bot.py

Issue 2636993002: swarming: Fix named cache support. (Closed)
Patch Set: Fix swarming_test.py Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/local_smoke_test.py ('k') | client/named_cache.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/tools/start_bot.py
diff --git a/appengine/swarming/tools/start_bot.py b/appengine/swarming/tools/start_bot.py
index b7f9f2b15a2a2d8ae0ccd764bbca6e38522c61ee..a7b74ee74f811e6babf527582c6ef67faa073369 100755
--- a/appengine/swarming/tools/start_bot.py
+++ b/appengine/swarming/tools/start_bot.py
@@ -6,6 +6,7 @@
"""Starts a local bot to connect to a local server."""
import glob
+import logging
import os
import signal
import socket
@@ -38,12 +39,13 @@ class LocalBot(object):
def wipe_cache(self):
"""Blows away this bot's cache."""
- cache_dir = os.path.join(self._tmpdir, 'isolated_cache')
- if os.path.exists(cache_dir):
- try:
- file_path.rmtree(cache_dir)
- except OSError:
- pass
+ for i in ('c', 'isolated_cache'):
+ cache_dir = os.path.join(self._tmpdir, i)
+ if os.path.exists(cache_dir):
+ try:
+ file_path.rmtree(cache_dir)
+ except OSError:
+ logging.info('Failed to deleted %s', cache_dir)
@property
def bot_id(self):
« no previous file with comments | « appengine/swarming/local_smoke_test.py ('k') | client/named_cache.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698