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
This commit is contained in:
James E. Blair 2018-05-04 15:01:37 -07:00
parent 74aabb8bbb
commit af11a96f78
1 changed files with 5 additions and 0 deletions

View File

@ -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 *