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

Unified Diff: build/android/pylib/results/flakiness_dashboard/json_results_generator.py

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors Created 5 years, 3 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: build/android/pylib/results/flakiness_dashboard/json_results_generator.py
diff --git a/build/android/pylib/results/flakiness_dashboard/json_results_generator.py b/build/android/pylib/results/flakiness_dashboard/json_results_generator.py
index e5c433dac5e348bc523722b07890208d6c81fa6e..7f849f9c0515a17fe2aa137068af537d469f0d6b 100644
--- a/build/android/pylib/results/flakiness_dashboard/json_results_generator.py
+++ b/build/android/pylib/results/flakiness_dashboard/json_results_generator.py
@@ -62,7 +62,7 @@ def AddPathToTrie(path, value, trie):
trie[path] = value
return
- directory, _slash, rest = path.partition('/')
+ directory, _, rest = path.partition('/')
if not directory in trie:
trie[directory] = {}
AddPathToTrie(rest, value, trie[directory])
@@ -237,8 +237,8 @@ class JSONResultsGeneratorBase(object):
builder_name = self._builder_name
if results_json and builder_name not in results_json:
- _log.debug('Builder name (%s) is not in the results.json file.'
- % builder_name)
+ _log.debug('Builder name (%s) is not in the results.json file.',
+ builder_name)
self._ConvertJSONToCurrentVersion(results_json)
@@ -297,12 +297,11 @@ class JSONResultsGeneratorBase(object):
_log.info('JSON uploaded.')
else:
_log.debug(
- "JSON upload failed, %d: '%s'" %
- (response.code, response.read()))
+ "JSON upload failed, %d: '%s'", response.code, response.read())
else:
_log.error('JSON upload failed; no response returned')
- except Exception, err:
- _log.error('Upload failed: %s' % err)
+ except Exception, err: # pylint: disable=broad-except
+ _log.error('Upload failed: %s', err)
return
def _GetTestTiming(self, test_name):
@@ -398,7 +397,7 @@ class JSONResultsGeneratorBase(object):
try:
results_json = json.loads(old_results)
- except Exception:
+ except Exception: # pylint: disable=broad-except
_log.debug('results.json was not valid JSON. Clobbering.')
# The JSON file is not valid JSON. Just clobber the results.
results_json = {}
@@ -645,7 +644,7 @@ class _FileUploader(object):
return urllib2.urlopen(request)
except urllib2.HTTPError as e:
_log.warn("Received HTTP status %s loading \"%s\". "
- 'Retrying in 10 seconds...' % (e.code, e.filename))
+ 'Retrying in 10 seconds...', e.code, e.filename)
time.sleep(10)

Powered by Google App Engine
This is Rietveld 408576698