mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +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
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
import queue
|
||||
import traceback
|
||||
@ -52,7 +53,11 @@ class RemoteSite:
|
||||
yield base_url
|
||||
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:
|
||||
return
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user