mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
Move settings.json into constant
Move settings.json into a constant so that they can later be referred to by the testing module.
This commit is contained in:
parent
ad16a0e471
commit
dfcb10c494
1 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,8 @@ log = logging.getLogger(__name__)
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .logic import DangerzoneCore
|
from .logic import DangerzoneCore
|
||||||
|
|
||||||
|
SETTINGS_FILENAME: str = "settings.json"
|
||||||
|
|
||||||
|
|
||||||
class Settings:
|
class Settings:
|
||||||
settings: Dict[str, Any]
|
settings: Dict[str, Any]
|
||||||
|
@ -20,7 +22,7 @@ class Settings:
|
||||||
def __init__(self, dangerzone: "DangerzoneCore") -> None:
|
def __init__(self, dangerzone: "DangerzoneCore") -> None:
|
||||||
self.dangerzone = dangerzone
|
self.dangerzone = dangerzone
|
||||||
self.settings_filename = os.path.join(
|
self.settings_filename = os.path.join(
|
||||||
self.dangerzone.appdata_path, "settings.json"
|
self.dangerzone.appdata_path, SETTINGS_FILENAME
|
||||||
)
|
)
|
||||||
self.default_settings: Dict[str, Any] = self.generate_default_settings()
|
self.default_settings: Dict[str, Any] = self.generate_default_settings()
|
||||||
self.load()
|
self.load()
|
||||||
|
|
Loading…
Reference in a new issue