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

Unified Diff: client/utils/file_path.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/zip_profiler.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/utils/file_path.py
diff --git a/client/utils/file_path.py b/client/utils/file_path.py
index 04294330ce8b510c77253826c7478f73cf424632..02cf766be9848bcfa8c0415fed9093d192baa377 100644
--- a/client/utils/file_path.py
+++ b/client/utils/file_path.py
@@ -873,6 +873,7 @@ def rmtree(root):
"""
# Do not assert here yet because this would break too much code.
root = unicode(root)
+ assert sys.getdefaultencoding() == 'utf-8', sys.getdefaultencoding()
make_tree_deleteable(root)
logging.info('rmtree(%s)', root)
« no previous file with comments | « client/tools/zip_profiler.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698