Remove MULTILINE, ^, and $ from re finding actual_results.json.
authorbungeman <bungeman@google.com>
Wed, 10 Dec 2014 20:18:03 +0000 (12:18 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 10 Dec 2014 20:18:04 +0000 (12:18 -0800)
MULTILINE, ^, and $ work based on the platform, but the files being
parsed are from other platforms. As a result, the current code for
extracting the actual_results.json version will not find it in
logfiles produced on Windows when run on Mac.

The code for extracting the exact actual_results.json file to use
from a logfile is itself something of a hack, as this information
should be provided ina more structured manner. This proposed
method of finding the exact file is no worse than the old one, and
in cases like above, better.

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

gm/rebaseline_server/download_actuals.py

index ae16770..0e60289 100755 (executable)
@@ -162,8 +162,8 @@ class RietveldIssueActuals(object):
     """
     result = dict()
     json_filename_re = re.compile(
-        '^Created: gs://([^/]+)/((?:[^/]+/)+%s)#(\d+)$'
-        % re.escape(self._json_filename), re.MULTILINE)
+        'Created: gs://([^/]+)/((?:[^/]+/)+%s)#(\d+)'
+        % re.escape(self._json_filename))
     codereview_api_url = 'https://codereview.chromium.org/api'
     upload_gm_step_url = '/steps/Upload GM Results/logs/stdio'