Commit 830e8da8 authored by cjhopman@chromium.org's avatar cjhopman@chromium.org

Use raw strings for javac colorize regexes

Particularly the '\\' in fileline_prefix would need to be '\\\\' in a
normal (non-raw) python string.

NOTRY=true

Review URL: https://codereview.chromium.org/330573003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276748 0039d316-1c4b-4281-b951-d872f2087c98
parent 9c445130
......@@ -18,11 +18,11 @@ import colorama
def ColorJavacOutput(output):
fileline_prefix = '(?P<fileline>(?P<file>[-.\w/\\]+.java):(?P<line>[0-9]+):)'
fileline_prefix = r'(?P<fileline>(?P<file>[-.\w/\\]+.java):(?P<line>[0-9]+):)'
warning_re = re.compile(
fileline_prefix + '(?P<full_message> warning: (?P<message>.*))$')
fileline_prefix + r'(?P<full_message> warning: (?P<message>.*))$')
error_re = re.compile(
fileline_prefix + '(?P<full_message> (?P<message>.*))$')
fileline_prefix + r'(?P<full_message> (?P<message>.*))$')
marker_re = re.compile(r'\s*(?P<marker>\^)\s*$')
warning_color = ['full_message', colorama.Fore.YELLOW + colorama.Style.DIM]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment