From: Carl Hetherington Date: Thu, 10 Dec 2015 09:22:45 +0000 (+0000) Subject: Nicer error if windows prefix is not configured when it is required. X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=71d19afe1cf4cfb694f9b7f4245ab29e20a54f8f;p=cdist.git Nicer error if windows prefix is not configured when it is required. --- 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 -