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

Unified Diff: third_party/WebKit/Tools/Scripts/webkit-patch

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
Index: third_party/WebKit/Tools/Scripts/webkit-patch
diff --git a/third_party/WebKit/Tools/Scripts/webkit-patch b/third_party/WebKit/Tools/Scripts/webkit-patch
index 060ad71ea413ee535ded6df611ce9be4b600c503..4a0c37edd1dc25e9ca219a920c6da1dc5e14e927 100755
--- a/third_party/WebKit/Tools/Scripts/webkit-patch
+++ b/third_party/WebKit/Tools/Scripts/webkit-patch
@@ -49,7 +49,10 @@ from webkitpy.tool.webkit_patch import WebKitPatch
# the default behaviour of writing to sys.stdout, so we intercept
# the case of writing raw strings and make sure StreamWriter gets
# input that it can handle.
+
+
class ForgivingUTF8Writer(codecs.lookup('utf-8')[-1]):
+
def write(self, object):
if isinstance(object, str):
# Assume raw strings are utf-8 encoded. If this line
@@ -67,6 +70,7 @@ sys.stdout = ForgivingUTF8Writer(sys.stdout)
_log = logging.getLogger("webkit-patch")
+
def main():
# This is a hack to let us enable DEBUG logging as early as possible.
# Note this can't be ternary as versioning.check_version()
« no previous file with comments | « third_party/WebKit/Tools/Scripts/run-bindings-tests ('k') | third_party/WebKit/Tools/Scripts/webkitpy/bindings/main.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698