From 9d70a1a4ac49902f643de2be1d3e6e9a1239f98e Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Mon, 13 Mar 2023 19:36:11 +0100 Subject: [PATCH] Fix encoding argument missing --- npbackup/__main__.py | 2 +- npbackup/gui/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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.")