diff --git a/app.py b/app.py index a86bf4a..7aabbe8 100644 --- a/app.py +++ b/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//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) diff --git a/version.txt b/version.txt index 314a62a..9cc0a9d 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.37 \ No newline at end of file +1.0.38 \ No newline at end of file