Add explicit ISO guard to restore_console_font
Matches the existing guards in _set_font and save_console_font. Behaviour was already safe implicitly via _font_backup=None, but the explicit check makes intent obvious at the call site.
This commit is contained in:
parent
4c0773cf54
commit
a973ca05c3
|
|
@ -97,6 +97,9 @@ class TranslationHandler:
|
|||
|
||||
def restore_console_font(self) -> None:
|
||||
"""Restore console font (with unicode map) and console map from backup."""
|
||||
if not running_from_iso():
|
||||
return
|
||||
|
||||
if self._font_backup is None or not self._font_backup.exists():
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue