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

Unified Diff: client/tools/zip_profiler.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 | « client/tools/run_swarming_tests_on_swarming.py ('k') | client/utils/file_path.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tools/zip_profiler.py
diff --git a/client/tools/zip_profiler.py b/client/tools/zip_profiler.py
index e2ceaddc4faa51224c2d2b3e7c317849f1097343..a7c63bd31c50b6aacb8f24b7455cf40a4aac3b49 100755
--- a/client/tools/zip_profiler.py
+++ b/client/tools/zip_profiler.py
@@ -11,7 +11,6 @@ isolated file.
import bz2
import optparse
import os
-import shutil
import subprocess
import sys
import tempfile
@@ -21,6 +20,8 @@ import zlib
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, ROOT_DIR)
+from third_party.depot_tools import fix_encoding
+from utils import file_path
from utils import tools
@@ -116,8 +117,9 @@ def main():
profile_compress('bz2', bz2.BZ2Compressor, range(1, 10), zip_directory,
temp_dir)
finally:
- shutil.rmtree(temp_dir)
+ file_path.rmtree(temp_dir)
if __name__ == '__main__':
+ fix_encoding.fix_encoding()
sys.exit(main())
« no previous file with comments | « client/tools/run_swarming_tests_on_swarming.py ('k') | client/utils/file_path.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698