From 71d19afe1cf4cfb694f9b7f4245ab29e20a54f8f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 10 Dec 2015 09:22:45 +0000 Subject: [PATCH] Nicer error if windows prefix is not configured when it is required. --- cdist/target.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cdist/target.py b/cdist/target.py index b4f7727..434d7d3 100644 --- a/cdist/target.py +++ b/cdist/target.py @@ -92,6 +92,8 @@ class WindowsTarget(Target): super(WindowsTarget, self).__init__('windows', directory) self.bits = bits + if globals.config.get('windows_environment_prefix') is None: + raise Error('windows prefix not configured') self.windows_prefix = '%s/%d' % (globals.config.get('windows_environment_prefix'), self.bits) if not os.path.exists(self.windows_prefix): raise Error('windows prefix %s does not exist' % self.windows_prefix) @@ -291,4 +293,3 @@ def factory(s, debug, work): target.debug = debug return target - -- 2.30.2