mirror of
https://github.com/1j01/textual-paint.git
synced 2025-01-03 12:22:23 +03:00
Ignore lack of discard_backup on GalleryApp
This commit is contained in:
parent
59feafc309
commit
d90f83de21
@ -14,10 +14,11 @@ if TYPE_CHECKING:
|
||||
def restart_program() -> None:
|
||||
"""Restarts the current program, after resetting terminal state, and cleaning up file objects and descriptors."""
|
||||
|
||||
try:
|
||||
_app.discard_backup()
|
||||
except Exception as e:
|
||||
print("Error discarding backup:", e)
|
||||
if hasattr(_app, "discard_backup"):
|
||||
try:
|
||||
_app.discard_backup() # type: ignore
|
||||
except Exception as e:
|
||||
print("Error discarding backup:", e)
|
||||
|
||||
try:
|
||||
_app.exit()
|
||||
|
Loading…
Reference in New Issue
Block a user