Skip to content

Commit

Permalink
some linux adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
R3tr0BoiDX committed Oct 14, 2023
1 parent ca3b750 commit 46ed447
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion build.linux.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
zip -r dist/smwc-browser.linux.amd64.zip dist/

3 changes: 1 addition & 2 deletions source/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions source/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@

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


def main():
"""Main entry point for the application."""
logging.basicConfig(level=LOG_LEVEL)
conf = config.Config()

if conf.get_sfc_path() is None:
Expand Down

0 comments on commit 46ed447

Please sign in to comment.