diff options
| author | user@node5.net <user@node5.net> | 2026-05-19 19:02:31 +0200 |
|---|---|---|
| committer | user@node5.net <user@node5.net> | 2026-05-19 19:02:31 +0200 |
| commit | d9821b300071ce4439c20e1b4e0527e3caa03db7 (patch) | |
| tree | c01bfc1b260ee7fdae3359462f4734f347c54e55 | |
| parent | 10ed02fe017a15befce10b50f5b6842ce39996c2 (diff) | |
fallback to build in blog source files if no environment variable
| -rw-r--r-- | src/blog_node5_net.py | 4 |
1 files changed, 1 insertions, 3 deletions
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')) |
