From af11a96f7810b06e534cdbf57adf52a4d827db1c Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 4 May 2018 15:01:37 -0700 Subject: [PATCH] Exit 0 if MAILMAN_SITE_DIR is not set This variable is required for the multihost hack to work, but the dpkg scripts don't know about it. Just exit 0 if it's not set (but still provide a message for admins) so that the dpkg scripts don't bomb. Change-Id: Ib5d806794d62c089f4267f7b5e4cee6e6702c5ff --- templates/mm_cfg_multihost.py.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/mm_cfg_multihost.py.erb b/templates/mm_cfg_multihost.py.erb index 39a240e..442f719 100644 --- a/templates/mm_cfg_multihost.py.erb +++ b/templates/mm_cfg_multihost.py.erb @@ -1,6 +1,11 @@ import os import sys +if 'MAILMAN_SITE_DIR' not in os.environ: + print("Please set MAILMAN_SITE_DIR") + # Exit 0 to avoid confusing the dpkg scripts + sys.exit(0) + sys.path.insert(0, os.path.join(os.environ['MAILMAN_SITE_DIR'], 'etc')) from mm_cfg_local import *