From 46ed4473757cd3b3f64f2406967eab143cdf6953 Mon Sep 17 00:00:00 2001 From: "Janisch, Mirco" Date: Sun, 15 Oct 2023 00:26:46 +0200 Subject: [PATCH] some linux adjustments --- build.linux.sh | 5 ++++- source/config.py | 3 +-- source/main.py | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.linux.sh b/build.linux.sh index 8f4ac21..b5d6694 100644 --- a/build.linux.sh +++ b/build.linux.sh @@ -1,5 +1,7 @@ #!/bin/bash +# May need to install apt install python3-venv + # Create a virtual environment echo "Creating a virtual environment..." python3 -m venv .venv @@ -20,4 +22,5 @@ cp -r media dist/ # Zipping the dist folder echo "Zipping the dist folder..." -zip -r dist.zip dist/smwc-browser.linux.amd64.zip \ No newline at end of file +zip -r dist/smwc-browser.linux.amd64.zip dist/ + diff --git a/source/config.py b/source/config.py index 6124f40..eb0ad96 100644 --- a/source/config.py +++ b/source/config.py @@ -32,7 +32,6 @@ def init_singleton(self): self.config = self.read_json(Path(CONFIG_PATH)) except FileNotFoundError as error: LoggerManager().logger.critical(error) - print(error) sys.exit(1) def read_json(self, config_file: Path) -> dict: @@ -48,7 +47,7 @@ def read_json(self, config_file: Path) -> dict: FileNotFoundError: If the config file does not exist. """ if not config_file.exists(): - raise FileNotFoundError(f"Config file {config_file} not found.") + raise FileNotFoundError(f"Config file {config_file} not found!") with open(config_file, mode="r", encoding="utf-8") as file: return json.load(file) diff --git a/source/main.py b/source/main.py index b8289a3..55fb531 100644 --- a/source/main.py +++ b/source/main.py @@ -9,8 +9,8 @@ SMW_CRC32 = "B19ED489" -LOG_LEVEL = logging.DEBUG +logging.basicConfig(level=logger.DEFAULT_LOG_LEVEL) logger.LoggerManager() # init logger config.Config() # init config arguments.Arguments() # init arguments @@ -18,7 +18,6 @@ def main(): """Main entry point for the application.""" - logging.basicConfig(level=LOG_LEVEL) conf = config.Config() if conf.get_sfc_path() is None: