|
From: Mercurial C. <th...@in...> - 2026-05-18 19:45:56
|
# HG changeset patch
# User John Rouillard <ro...@ie...>
# Date 1779132349 14400
# Mon May 18 15:25:49 2026 -0400
# Node ID cafa177776bbb83a0e7dc44329dd8abba82f082f
# Parent d2da5f9c2ea8a2947459c517c1b0ca0f7284c4c9
bug: handle ConfigurationError when running demo.
Don't report traceback if a ConfigurationError occurs when running the
demo tracker. Just report the error and the config.ini absolute
filename.
diff -r d2da5f9c2ea8 -r cafa177776bb CHANGES.txt
--- a/CHANGES.txt Mon May 18 11:25:36 2026 -0400
+++ b/CHANGES.txt Mon May 18 15:25:49 2026 -0400
@@ -125,6 +125,8 @@
again after 5 seconds. (John Rouillard)
- Fix developers.txt doc bug (discovered by Ross Boylan, change by
John Rouillard)
+- Handle ConfigurationErrors in demo.py cleanly. Used to dump a full
+ traceback. Now prints error and exits. (John Rouillard)
Features:
diff -r d2da5f9c2ea8 -r cafa177776bb roundup/demo.py
--- a/roundup/demo.py Mon May 18 11:25:36 2026 -0400
+++ b/roundup/demo.py Mon May 18 15:25:49 2026 -0400
@@ -129,7 +129,13 @@
print("\nDemo Tracker Home:", home)
- cfg = configuration.CoreConfig(home)
+ try:
+ cfg = configuration.CoreConfig(home)
+ except configuration.ConfigurationError as e:
+ print(e)
+ print("when processing: %s", os.path.join(home, "config.ini")
+ sys.exit(2)
+
url = cfg["TRACKER_WEB"]
try:
hostname, port = urllib_.urlsplit(url)[1].split(':')
|