Skip to content

Commit 6ed4401

Browse files
committed
Permit issue posting to have network failures
1 parent 488f16a commit 6ed4401

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/tools/publish_toolstate.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,18 @@ def update_latest(
145145
build_failed = True
146146

147147
if build_failed:
148-
issue(
149-
tool, MAINTAINERS.get(tool),
150-
relevant_pr_number, relevant_pr_user, pr_reviewer,
151-
)
148+
try:
149+
issue(
150+
tool, MAINTAINERS.get(tool),
151+
relevant_pr_number, relevant_pr_user, pr_reviewer,
152+
)
153+
except IOError as (errno, strerror):
154+
# network errors will simply end up not creating an issue, but that's better
155+
# than failing the entire build job
156+
print "I/O error({0}): {1}".format(errno, strerror)
157+
except:
158+
print "Unexpected error:", sys.exc_info()[0]
159+
raise
152160

153161
if changed:
154162
status['commit'] = current_commit

0 commit comments

Comments
 (0)