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

Unified Diff: scripts/slave/build_scan.py

Issue 2451213004: build_scan: Raise ValueError on URL fetch error (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/build_scan.py
diff --git a/scripts/slave/build_scan.py b/scripts/slave/build_scan.py
index b73c995e079b699407edbf18129903363a6438c4..1c35fc0d8f7e91bd1a93964737ede26b6588c487 100755
--- a/scripts/slave/build_scan.py
+++ b/scripts/slave/build_scan.py
@@ -236,10 +236,19 @@ def get_options():
def get_updated_builds(masters, build_db, parallelism):
- new_builds, master_jsons = find_new_builds_per_master(masters, build_db)
- build_jsons = get_build_jsons(new_builds, parallelism)
- propagate_build_json_to_db(build_db, build_jsons)
- return master_jsons, build_jsons
+ try:
+ new_builds, master_jsons = find_new_builds_per_master(masters, build_db)
+ build_jsons = get_build_jsons(new_builds, parallelism)
+ propagate_build_json_to_db(build_db, build_jsons)
+ return master_jsons, build_jsons
+
+ # Catch this and raise a ValueError because this can be called from
+ # mulitprocessing, which can't pickle SSLContext objects, which apparently are
+ # properties of urllib2.URLError (it seems).
+ except (urllib2.URLError, IOError) as f:
+ msg = "URL Fetch timed out: %s" % f
ghost stip (do not use) 2016/10/27 23:41:18 probably want to make this something like "Error e
martiniss 2016/10/27 23:44:04 Done.
+ logging.error(msg)
+ raise ValueError(msg)
def main():
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698