mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
panic if failed to get the file list
This commit is contained in:
parent
01ec7c17b7
commit
28e9dd3f81
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import queue
|
import queue
|
||||||
import traceback
|
import traceback
|
||||||
@ -52,7 +53,11 @@ class RemoteSite:
|
|||||||
yield base_url
|
yield base_url
|
||||||
return
|
return
|
||||||
|
|
||||||
r = requests.get(base_url, timeout=TIMEOUT_OPTION)
|
try:
|
||||||
|
r = requests.get(base_url, timeout=TIMEOUT_OPTION)
|
||||||
|
except:
|
||||||
|
print("Panic: failed to get file list");
|
||||||
|
sys.exit(1)
|
||||||
if not r.ok:
|
if not r.ok:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user