mirror of
https://github.com/OfflineIMAP/offlineimap3.git
synced 2026-05-25 11:25:38 +02:00
0290d94182
Replace the bare open()/close() pattern with a context manager and wrap I/O and encoding failures in OfflineImapError so the user gets a clear, actionable message instead of a raw Python exception. Before this change, a missing, unreadable, or non-UTF-8 password file would surface as an unhandled FileNotFoundError, PermissionError or UnicodeDecodeError with no indication of which repository was affected. The new error message includes the expanded file path and the repository name: Unable to read remotepassfile '/path/to/pass' for repository 'Name': ... Closes: #248