- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user