diff --git a/npbackup/__main__.py b/npbackup/__main__.py index 414e7d5..727e1c9 100644 --- a/npbackup/__main__.py +++ b/npbackup/__main__.py @@ -239,7 +239,7 @@ This is free software, and you are welcome to redistribute it under certain cond if args.license: try: - with open(LICENSE_FILE, "r", "utf-8") as file_handle: + with open(LICENSE_FILE, "r", encoding="utf-8") as file_handle: print(file_handle.read()) except OSError: print(LICENSE_TEXT) diff --git a/npbackup/gui/main.py b/npbackup/gui/main.py index 8d6668c..86a9d11 100644 --- a/npbackup/gui/main.py +++ b/npbackup/gui/main.py @@ -61,7 +61,7 @@ def _about_gui(version_string: str, config_dict: dict) -> None: elif result is None: new_version = [sg.Text(_t("config_gui.auto_upgrade_disabled"))] try: - with open(LICENSE_FILE, "r") as file_handle: + with open(LICENSE_FILE, "r", encoding="utf-8") as file_handle: license_content = file_handle.read() except OSError: logger.info("Could not read license file.")