feat: Fehlerbehandlung für rclone-Befehle verbessert und Versionsnummer auf 1.0.38 erhöht
This commit is contained in:
15
app.py
15
app.py
@@ -877,11 +877,10 @@ def _rclone(*args, timeout=60):
|
||||
['rclone', '--config', str(RCLONE_CONF)] + list(args),
|
||||
capture_output=True, text=True, timeout=timeout
|
||||
)
|
||||
except subprocess.TimeoutExpired as e:
|
||||
if e.process:
|
||||
e.process.kill()
|
||||
# Fake CompletedProcess mit Fehlercode
|
||||
return subprocess.CompletedProcess(args, 1, stdout='', stderr='Timeout')
|
||||
except subprocess.TimeoutExpired:
|
||||
return subprocess.CompletedProcess(args, 1, stdout='', stderr=f'Timeout nach {timeout}s')
|
||||
except Exception as e:
|
||||
return subprocess.CompletedProcess(args, 1, stdout='', stderr=str(e))
|
||||
|
||||
|
||||
def _rclone_obscure(pw):
|
||||
@@ -1242,7 +1241,11 @@ def r_upload_toggle(tid):
|
||||
|
||||
@app.route('/api/upload/targets/<tid>/test', methods=['POST'])
|
||||
def r_upload_test(tid):
|
||||
ok, err = test_remote(tid)
|
||||
try:
|
||||
ok, err = test_remote(tid)
|
||||
except Exception as e:
|
||||
log.exception('upload test failed')
|
||||
ok, err = False, str(e)
|
||||
return jsonify(ok=ok, error=err)
|
||||
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.37
|
||||
1.0.38
|
||||
Reference in New Issue
Block a user