Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f3d076

Browse files
authored
Merge pull request #25517 from meeseeksmachine/auto-backport-of-pr-25494-on-v3.7.1-doc
Backport PR #25494 on branch v3.7.1-doc (Ignore errors loading artifacts from CircleCI)
2 parents 689bafd + b747aec commit 7f3d076

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)