From d2d2910276ece019f65e43be667d558078618867 Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Sun, 25 Feb 2024 11:45:32 -0500 Subject: [PATCH] fix no such file error --- ntclient/persistence/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ntclient/persistence/__init__.py b/ntclient/persistence/__init__.py index 48f780c..167bf13 100644 --- a/ntclient/persistence/__init__.py +++ b/ntclient/persistence/__init__.py @@ -17,7 +17,9 @@ from ntclient import NUTRA_HOME PREFS_FILE = os.path.join(NUTRA_HOME, "prefs.ini") -if not os.path.exists(PREFS_FILE): +os.makedirs(NUTRA_HOME, 0o755, exist_ok=True) + +if not os.path.isfile(PREFS_FILE): print("INFO: Generating prefs.ini file") config = configparser.ConfigParser() with open(PREFS_FILE, "w", encoding="utf-8") as _prefs_file: -- 2.52.0