8000 Merge pull request #25494 from QuLogic/circle-errors · matplotlib/matplotlib@0b4e615 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b4e615

Browse files
authored
Merge pull request #25494 from QuLogic/circle-errors
Ignore errors loading artifacts from CircleCI
2 parents 8ef978d + 529bfb4 commit 0b4e615

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.circleci/fetch_doc_logs.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from pathlib import Path
2323
import sys
2424
from urllib.parse import urlparse
25-
from urllib.request import urlopen
25+
from urllib.request import URLError, urlopen
2626

2727

2828
if len(sys.argv) != 2:
@@ -38,8 +38,11 @@
3838
f'{organization}/{repository}/{build_id}/artifacts'
3939
)
4040
print(artifact_url)
41-
with urlopen(artifact_url) as response:
42-
artifacts = json.load(response)
41+
try:
42+
with urlopen(artifact_url) as response:
43+
artifacts = json.load(response)
44+
except URLError:
45+
artifacts = {'items': []}
4346
artifact_count = len(artifacts['items'])
4447
print(f'Found {artifact_count} artifacts')
4548

0 commit comments

Comments
 (0)
0