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

Unified Diff: client/utils/fs.py

Issue 2847153002: Cache/retrieve extracted CIPD packages in local isolate cache (Closed)
Patch Set: Fix unicode glitch and make assertions less terrible to find Created 3 years, 8 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
« client/cipd.py ('K') | « client/run_isolated.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/utils/fs.py
diff --git a/client/utils/fs.py b/client/utils/fs.py
index c743f2b7f4a5d27bad146319a1f0656c5f7c263a..a1e378e54dbeaba99aa7626dcb55e9df348db468 100644
--- a/client/utils/fs.py
+++ b/client/utils/fs.py
@@ -121,8 +121,8 @@ else:
In some rare case, concatenating str and unicode may cause a
UnicodeEncodeError because the default encoding is 'ascii'.
"""
- assert os.path.isabs(path), path
- assert isinstance(path, unicode), path
+ assert os.path.isabs(path), '%s must be absolute' % path
M-A Ruel 2017/05/08 13:13:14 update lines 37-38 to be coherent Use %r what do y
kjlubick 2017/05/08 18:59:29 Done. I don't know what I meant. To quote Gary
+ assert isinstance(path, unicode), '%s must be a path or unicode' % path
return path.encode('utf-8')
« client/cipd.py ('K') | « client/run_isolated.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698