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

Unified Diff: client/tests/file_path_test.py

Issue 2093593002: luci-py: Making __file__ usage unicode safe. (Closed) Base URL: https://github.com/luci/luci-py.git@master
Patch Set: Small fixes. Created 4 years, 6 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/swarming.py ('k') | client/tests/isolate_format_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/file_path_test.py
diff --git a/client/tests/file_path_test.py b/client/tests/file_path_test.py
index 85773b0fb8a3abe2f12670df0ffe521d1353bbf0..e73e494d8598ac377c0ea408245fb19f86a3d46a 100755
--- a/client/tests/file_path_test.py
+++ b/client/tests/file_path_test.py
@@ -14,12 +14,13 @@ import subprocess
import sys
import time
-BASE_DIR = unicode(os.path.dirname(os.path.abspath(__file__)))
+BASE_DIR = os.path.dirname(os.path.abspath(
+ __file__.decode(sys.getfilesystemencoding())))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.insert(0, ROOT_DIR)
sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party'))
-FILE_PATH = unicode(os.path.abspath(__file__))
+FILE_PATH = os.path.abspath(__file__.decode(sys.getfilesystemencoding()))
from depot_tools import auto_stub
from depot_tools import fix_encoding
« no previous file with comments | « client/swarming.py ('k') | client/tests/isolate_format_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698