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

Unified Diff: client/utils/fs.py

Issue 2847153002: Cache/retrieve extracted CIPD packages in local isolate cache (Closed)
Patch Set: Cache cipd packages individually (for peak freshness) Created 3 years, 7 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/tests/run_isolated_test.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..cda292ea6c6040933af3f826a0c2534ec8ab0ee7 100644
--- a/client/utils/fs.py
+++ b/client/utils/fs.py
@@ -34,8 +34,8 @@ if sys.platform == 'win32':
"""Adds '\\\\?\\' when given an absolute path so the MAX_PATH (260) limit is
not enforced.
"""
- assert os.path.isabs(path), path
- assert isinstance(path, unicode), path
+ assert os.path.isabs(path), '%r must be absolute' % path
+ assert isinstance(path, unicode), '%r must be unicode' % path
prefix = u'\\\\?\\'
return path if path.startswith(prefix) else prefix + path
@@ -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), '%r must be absolute' % path
+ assert isinstance(path, unicode), '%r must be unicode' % path
return path.encode('utf-8')
« client/cipd.py ('K') | « client/tests/run_isolated_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698