Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 689bafd + b747aec commit 7f3d076Copy full SHA for 7f3d076
.circleci/fetch_doc_logs.py
@@ -22,7 +22,7 @@
22
from pathlib import Path
23
import sys
24
from urllib.parse import urlparse
25
-from urllib.request import urlopen
+from urllib.request import URLError, urlopen
26
27
28
if len(sys.argv) != 2:
@@ -38,8 +38,11 @@
38
f'{organization}/{repository}/{build_id}/artifacts'
39
)
40
print(artifact_url)
41
-with urlopen(artifact_url) as response:
42
- artifacts = json.load(response)
+try:
+ with urlopen(artifact_url) as response:
43
+ artifacts = json.load(response)
44
+except URLError:
45
+ artifacts = {'items': []}
46
artifact_count = len(artifacts['items'])
47
print(f'Found {artifact_count} artifacts')
48
0 commit comments