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

Unified Diff: git_cache.py

Issue 829453004: Fix for print(file=something) (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: reworked Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cache.py
diff --git a/git_cache.py b/git_cache.py
index cb7f7e30dfcd55bd563fb51f92c4b753501c789b..7cc19bdb24e8db0fa8c049b0ebc345e0744c48a8 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -150,7 +150,14 @@ class Mirror(object):
self.refs = refs or []
self.basedir = self.UrlToCacheDir(url)
self.mirror_path = os.path.join(self.GetCachePath(), self.basedir)
- self.print = print_func or print
+ if print_func:
+ self.print = self.print_without_file
+ self.print_func = print_func
+ else:
+ self.print = print
+
+ def print_without_file(self, message, **kwargs):
+ self.print_func(message)
@property
def bootstrap_bucket(self):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698