Chromium Code Reviews| 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 4a0c37edd1dc25e9ca219a920c6da1dc5e14e927..4536849eae2b51e9137d4b565fbb5a0a4619eb2f 100755 |
| --- a/third_party/WebKit/Tools/Scripts/webkit-patch |
| +++ b/third_party/WebKit/Tools/Scripts/webkit-patch |
| @@ -33,13 +33,10 @@ |
| # A tool for automating dealing with bugzilla, posting patches, committing patches, etc. |
| import logging |
| -import os |
| import signal |
| import sys |
| import codecs |
| -import webkitpy.common.version_check |
|
Dirk Pranke
2016/07/01 22:55:42
This line needs to stay in. Look at the module to
qyearsley
2016/07/02 17:26:29
Done
|
| - |
| from webkitpy.common.system.logutils import configure_logging |
| from webkitpy.tool.webkit_patch import WebKitPatch |
| @@ -53,14 +50,14 @@ from webkitpy.tool.webkit_patch import WebKitPatch |
| class ForgivingUTF8Writer(codecs.lookup('utf-8')[-1]): |
| - def write(self, object): |
| - if isinstance(object, str): |
| + def write(self, obj): |
| + if isinstance(obj, str): |
| # Assume raw strings are utf-8 encoded. If this line |
| # fails with an UnicodeDecodeError, our assumption was |
| # wrong, and the stacktrace should show you where we |
| # write non-Unicode/UTF-8 data (which we shouldn't). |
| - object = object.decode('utf-8') |
| - return codecs.StreamWriter.write(self, object) |
| + obj = obj.decode('utf-8') |
| + return codecs.StreamWriter.write(self, obj) |
| # By default, sys.stdout assumes ascii encoding. Since our messages can |
| # contain unicode strings (as with some peoples' names) we need to apply |
| @@ -80,7 +77,7 @@ def main(): |
| else: |
| logging_level = logging.INFO |
| configure_logging(logging_level=logging_level) |
| - WebKitPatch(os.path.abspath(__file__)).main() |
| + WebKitPatch().main() |
| if __name__ == "__main__": |