Fix #347: Fix NameError in open_file timeout message (#351)

- Fix undefined 'timeout' variable in error message
- Use defined TIMEOUT constant instead of undefined timeout variable
- Prevents NameError when LibreOffice crashes during file opening
This commit is contained in:
eun2ce
2025-10-06 23:14:15 +09:00
committed by GitHub
parent ff6285cfbb
commit 5eff00a9e3

View File

@@ -1370,7 +1370,7 @@ def open_file():
if window_found:
return "File opened and window activated successfully"
else:
return f"Failed to find window for {file_name} within {timeout} seconds.", 500
return f"Failed to find window for {file_name} within {TIMEOUT} seconds.", 500
except Exception as e:
return f"Failed to open {path}. Error: {e}", 500