From d9821b300071ce4439c20e1b4e0527e3caa03db7 Mon Sep 17 00:00:00 2001 From: "user@node5.net" Date: Tue, 19 May 2026 19:02:31 +0200 Subject: fallback to build in blog source files if no environment variable --- src/blog_node5_net.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/blog_node5_net.py b/src/blog_node5_net.py index 7da959c..c9e4e1d 100644 --- a/src/blog_node5_net.py +++ b/src/blog_node5_net.py @@ -51,9 +51,7 @@ stream_handler.setFormatter(CustomFormatter()) logger.root.addHandler(stream_handler) logger.info(f"Debug: {'en' if debug else 'dis'}abled") -content_root_path = os.environ.get("CONTENT_ROOT_PATH") -if not content_root_path: - sys.exit("ERROR: required environment variable CONTENT_ROOT_PATH is not set") +content_root_path = os.environ["CONTENT_ROOT_PATH"] if "CONTENT_ROOT_PATH" in os.environ else './blog.node5.net/' article_generator = article.ArticleGenerator(os.path.join(content_root_path, 'articles')) -- cgit 1.4.1