Skip to content

Commit d0182d1

Browse files
Ignore urlopen erro
1 parent ee511df commit d0182d1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@ def build_extension(self, ext):
7878
with open("pybind11/LICENSE", "r") as license_file:
7979
licenses = license_file.read() + "\n\n\n"
8080

81-
with urllib.request.urlopen(
82-
"https://raw.githubusercontent.com/Geant4/geant4/v10.7.1/LICENSE") as resp:
83-
licenses += resp.read().decode("utf-8")
81+
try:
82+
with urllib.request.urlopen(
83+
"https://raw.githubusercontent.com/Geant4/geant4/v10.7.1/LICENSE") as resp:
84+
licenses += resp.read().decode("utf-8")
85+
except:
86+
pass
8487

8588
with open("LICENSE-3RD-PARTY", "w") as license_file:
8689
license_file.write(licenses)

0 commit comments

Comments
 (0)