From 7b835b26b4ed6bbd4f52a1686bc87963abab5f9c Mon Sep 17 00:00:00 2001 From: chaol Date: Mon, 21 Aug 2023 13:31:10 +0800 Subject: [PATCH 1/2] Fix: "name 'os' is not defined" fault in preinst --- howdy/debian/preinst | 1 + 1 file changed, 1 insertion(+) diff --git a/howdy/debian/preinst b/howdy/debian/preinst index 2318c92..a29bbb6 100755 --- a/howdy/debian/preinst +++ b/howdy/debian/preinst @@ -4,6 +4,7 @@ import subprocess import sys +import os # Backup the config file if we're upgrading if "upgrade" in sys.argv: From ab82274a33e791229034eb07a900b0987aa5b00d Mon Sep 17 00:00:00 2001 From: chaol Date: Mon, 21 Aug 2023 14:20:40 +0800 Subject: [PATCH 2/2] Fix wrong config path --- howdy/src/cli/disable.py | 2 +- howdy/src/cli/set.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/howdy/src/cli/disable.py b/howdy/src/cli/disable.py index be78c97..e6b635d 100644 --- a/howdy/src/cli/disable.py +++ b/howdy/src/cli/disable.py @@ -10,7 +10,7 @@ import configparser from i18n import _ # Get the absolute filepath -config_path = os.path.dirname("/etc/howdy") + "/config.ini" +config_path = os.path.dirname("/etc/howdy/") + "/config.ini" # Read config from disk config = configparser.ConfigParser() diff --git a/howdy/src/cli/set.py b/howdy/src/cli/set.py index 14d15c2..0f36817 100644 --- a/howdy/src/cli/set.py +++ b/howdy/src/cli/set.py @@ -9,7 +9,7 @@ import fileinput from i18n import _ # Get the absolute filepath -config_path = os.path.dirname("/etc/howdy") + "/config.ini" +config_path = os.path.dirname("/etc/howdy/") + "/config.ini" # Check if enough arguments have been passed if len(builtins.howdy_args.arguments) < 2: