mirror of
https://github.com/obskyr/khinsider.git
synced 2025-03-11 21:59:39 +01:00
parent
828c3b5785
commit
6fde4be7e0
@ -178,7 +178,7 @@ def friendlyDownloadFile(file, path, name, index, total, verbose=False):
|
|||||||
print("Couldn't download {}. Trying again...".format(name))
|
print("Couldn't download {}. Trying again...".format(name))
|
||||||
try:
|
try:
|
||||||
file.download(path)
|
file.download(path)
|
||||||
except requests.ConnectionError:
|
except (requests.ConnectionError, requests.Timeout):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
@ -474,7 +474,7 @@ if __name__ == '__main__':
|
|||||||
print(soundtrack.id)
|
print(soundtrack.id)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("Stopped download.")
|
print("Stopped download.")
|
||||||
except requests.ConnectionError:
|
except (requests.ConnectionError, requests.Timeout):
|
||||||
print("Could not connect to KHInsider.")
|
print("Could not connect to KHInsider.")
|
||||||
print("Make sure you have a working internet connection.")
|
print("Make sure you have a working internet connection.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user