OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 Code Aurora Forum. All rights reserved. | 2 # Copyright (c) 2011 Code Aurora Forum. All rights reserved. |
3 # Copyright (c) 2010 Google Inc. All rights reserved. | 3 # Copyright (c) 2010 Google Inc. All rights reserved. |
4 # Copyright (c) 2009 Apple Inc. All rights reserved. | 4 # Copyright (c) 2009 Apple Inc. All rights reserved. |
5 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) | 5 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) |
6 # | 6 # |
7 # Redistribution and use in source and binary forms, with or without | 7 # Redistribution and use in source and binary forms, with or without |
8 # modification, are permitted provided that the following conditions are | 8 # modification, are permitted provided that the following conditions are |
9 # met: | 9 # met: |
10 # | 10 # |
(...skipping 20 matching lines...) Expand all Loading... |
31 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 31 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32 | 32 |
33 import codecs | 33 import codecs |
34 import logging | 34 import logging |
35 import os | 35 import os |
36 import signal | 36 import signal |
37 import sys | 37 import sys |
38 | 38 |
39 import webkitpy.common.version_check | 39 import webkitpy.common.version_check |
40 | 40 |
41 from webkitpy.common.system.logutils import configure_logging | 41 from webkitpy.common.system.log_utils import configure_logging |
42 from webkitpy.tool.webkit_patch import WebKitPatch | 42 from webkitpy.tool.webkit_patch import WebKitPatch |
43 | 43 |
44 # A StreamWriter will by default try to encode all objects passed | 44 # A StreamWriter will by default try to encode all objects passed |
45 # to write(), so when passed a raw string already encoded as utf8, | 45 # to write(), so when passed a raw string already encoded as utf8, |
46 # it will blow up with an UnicodeDecodeError. This does not match | 46 # it will blow up with an UnicodeDecodeError. This does not match |
47 # the default behaviour of writing to sys.stdout, so we intercept | 47 # the default behaviour of writing to sys.stdout, so we intercept |
48 # the case of writing raw strings and make sure StreamWriter gets | 48 # the case of writing raw strings and make sure StreamWriter gets |
49 # input that it can handle. | 49 # input that it can handle. |
50 | 50 |
51 | 51 |
(...skipping 25 matching lines...) Expand all Loading... |
77 logging_level = logging.INFO | 77 logging_level = logging.INFO |
78 configure_logging(logging_level=logging_level) | 78 configure_logging(logging_level=logging_level) |
79 WebKitPatch(os.path.abspath(__file__)).main() | 79 WebKitPatch(os.path.abspath(__file__)).main() |
80 | 80 |
81 | 81 |
82 if __name__ == "__main__": | 82 if __name__ == "__main__": |
83 try: | 83 try: |
84 main() | 84 main() |
85 except KeyboardInterrupt: | 85 except KeyboardInterrupt: |
86 sys.exit(signal.SIGINT + 128) | 86 sys.exit(signal.SIGINT + 128) |
OLD | NEW |