Skip to content

Commit 6c895e7

Browse files
committed
Dont check 07th-mod connectivity for URLOpen/CURL/Aria
1 parent 26e704c commit 6c895e7

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

common.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,11 @@ def testCurlHeaders(url, certPath):
240240
paths_to_try = [None, Globals.CA_CERT_PATH, "curl-ca-bundle.crt"]
241241

242242
for certificate_path in paths_to_try:
243-
if not testCurlHeaders('https://07th-mod.com/', certificate_path):
244-
print("chooseCurlCertificate(): Failed to download headers using CURL from 07th-mod.com using cert [{}]".format(certificate_path))
245-
continue
246-
247243
if not testCurlHeaders('https://github.com/', certificate_path):
248244
print("chooseCurlCertificate(): Failed to download headers using CURL from github.com using cert [{}]".format(certificate_path))
249245
continue
250246

251-
print("chooseCurlCertificate(): Will use certificate [{}] when using cURL with 07th-mod and github".format(certificate_path))
247+
print("chooseCurlCertificate(): Will use certificate [{}] when using cURL".format(certificate_path))
252248
Globals.CA_CERT_PATH = certificate_path
253249
return
254250

@@ -272,15 +268,11 @@ def testURLOpenHeaders(url, certPath):
272268
paths_to_try = [None, Globals.CA_CERT_PATH, "curl-ca-bundle.crt"]
273269

274270
for certificate_path in paths_to_try:
275-
if not testURLOpenHeaders(Request('https://07th-mod.com/', headers={"User-Agent": ""}), certificate_path):
276-
print("chooseURLOpenCertificate(): Failed to download headers using urlOpen from 07th-mod.com using cert [{}]".format(certificate_path))
277-
continue
278-
279271
if not testURLOpenHeaders(Request('https://github.com/', headers={"User-Agent": ""}), certificate_path):
280272
print("chooseURLOpenCertificate(): Failed to download headers using urlOpen from github.com using cert [{}]".format(certificate_path))
281273
continue
282274

283-
print("chooseURLOpenCertificate(): Will use certificate [{}] for URLOpen() on 07th-mod and github".format(certificate_path))
275+
print("chooseURLOpenCertificate(): Will use certificate [{}] for URLOpen()".format(certificate_path))
284276
Globals.URLOPEN_CERT_PATH = certificate_path
285277
return
286278

@@ -290,7 +282,7 @@ def testURLOpenHeaders(url, certPath):
290282
@staticmethod
291283
def scanForAria():
292284
ariaSearchPaths = ["./aria2c", "./.aria2c", "aria2c"]
293-
Globals.ARIA_EXECUTABLE = findWorkingExecutablePath(ariaSearchPaths, ['https://07th-mod.com/', '--dry-run=true'])
285+
Globals.ARIA_EXECUTABLE = findWorkingExecutablePath(ariaSearchPaths, ['https://github.com/', '--dry-run=true'])
294286

295287
if Globals.ARIA_EXECUTABLE is None:
296288
print("\nWARNING: aria2 failed to download 07th-mod website. Using fallback detection method.")

0 commit comments

Comments
 (0)