diff --git a/app.py b/app.py index 6dfbb59..a86bf4a 100644 --- a/app.py +++ b/app.py @@ -872,10 +872,16 @@ upload_lock = threading.Lock() def _rclone(*args, timeout=60): - return subprocess.run( - ['rclone', '--config', str(RCLONE_CONF)] + list(args), - capture_output=True, text=True, timeout=timeout - ) + try: + return subprocess.run( + ['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') def _rclone_obscure(pw): @@ -2355,9 +2361,11 @@ async function utSave(){ const r=await api('/upload/targets','POST',body); if(r.error){flash('ut-form-flash','err',r.error);return;} flash('ut-form-flash','warn','Teste Verbindung - Schreibzugriff wird geprüft...'); - const t=await api('/upload/targets/'+r.id+'/test','POST'); - if(t.ok){flash('ut-form-flash','ok','✓ Verbindung OK - Lesen & Schreiben erfolgreich');utToggleForm();await loadUTs();} - else flash('ut-form-flash','err','✗ '+(t.error||'Test fehlgeschlagen')); + try{ + const t=await api('/upload/targets/'+r.id+'/test','POST'); + if(t.ok){flash('ut-form-flash','ok','✓ Verbindung OK - Lesen & Schreiben erfolgreich');utToggleForm();await loadUTs();} + else flash('ut-form-flash','err','✗ '+(t.error||'Test fehlgeschlagen')); + }catch(e){flash('ut-form-flash','err','✗ Test fehlgeschlagen (Server-Timeout)');} } async function utTest(id){ const btn=$('ut-test-'+id), res=$('ut-test-result-'+id); diff --git a/version.txt b/version.txt index d1c66e6..314a62a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.36 \ No newline at end of file +1.0.37 \ No newline at end of file