mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-21 11:27:38 +03:00
config: Add class member and methods for signalling/checking shutdown status
This commit is contained in:
parent
a1423c7eba
commit
50f9410c02
@ -117,8 +117,16 @@ class AbstractConfig(abc.ABC):
|
||||
identifier: str
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.in_shutdown = False # Is the application currently shutting down ?
|
||||
self.home = pathlib.Path.home()
|
||||
|
||||
def set_shutdown(self):
|
||||
self.in_shutdown = True
|
||||
|
||||
@property
|
||||
def shutting_down(self) -> bool:
|
||||
return self.in_shutdown
|
||||
|
||||
@property
|
||||
def app_dir_str(self) -> str:
|
||||
"""Return a string version of app_dir."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user