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

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

Issue 1390773002: Add an assert to ensure UTF-8 locale when handling file paths. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: More fixes Created 5 years, 2 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/swarming_bot/main_test.py ('k') | appengine/swarming/tools/start_servers.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 1f888b21f350257383b9fb0992e8193a92d98676..bf1b28711403e2a0822dcd3d613339658667d923 100755
--- a/appengine/swarming/tools/start_bot.py
+++ b/appengine/swarming/tools/start_bot.py
@@ -8,7 +8,6 @@
import glob
import os
import signal
-import shutil
import socket
import sys
import tempfile
@@ -18,6 +17,8 @@ import urllib
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
CLIENT_DIR = os.path.join(THIS_DIR, '..', '..', '..', 'client')
sys.path.insert(0, CLIENT_DIR)
+from third_party.depot_tools import fix_encoding
+from utils import file_path
from utils import subprocess42
sys.path.pop(0)
@@ -78,7 +79,7 @@ class LocalBot(object):
self._read_log(i)
if not leak:
try:
- shutil.rmtree(self._tmpdir)
+ file_path.rmtree(self._tmpdir)
except OSError:
print >> sys.stderr, 'Leaking %s' % self._tmpdir
self._tmpdir = None
@@ -121,6 +122,7 @@ class LocalBot(object):
def main():
+ fix_encoding.fix_encoding()
if len(sys.argv) != 2:
print >> sys.stderr, 'Specify url to Swarming server'
return 1
« no previous file with comments | « appengine/swarming/swarming_bot/main_test.py ('k') | appengine/swarming/tools/start_servers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698