From: Frank Brehm Date: Mon, 20 Aug 2018 10:48:08 +0000 (+0200) Subject: Adding handler object to base application X-Git-Tag: 0.8.4^2~3 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=2feafccc4cd84a3fa8b50512b4dc0aa71a11a47d;p=pixelpark%2Fpuppetmaster-webhooks.git Adding handler object to base application --- diff --git a/lib/webhooks/base_app.py b/lib/webhooks/base_app.py index 2a3f1b6..7c8cc2b 100644 --- a/lib/webhooks/base_app.py +++ b/lib/webhooks/base_app.py @@ -99,6 +99,8 @@ class BaseHookApp(BaseObject): self.puppet_bin = None self.curl_bin = None + self.handler = None + self.error_data = [] self.smtp_server = 'localhost' self.smtp_port = 25 @@ -125,6 +127,9 @@ class BaseHookApp(BaseObject): self.search_puppet_bin() self.search_curl_bin() + self.handler = BaseHandler( + appname=self.appname, verbose=self.verbose, base_dir=self.base_dir) + return # ----------------------------------------------------------- diff --git a/lib/webhooks/r10k.py b/lib/webhooks/r10k.py index 873c649..8f3d486 100644 --- a/lib/webhooks/r10k.py +++ b/lib/webhooks/r10k.py @@ -278,6 +278,7 @@ class R10kHookApp(BaseHookApp): self.r10k_bin, 'deploy', 'environment', self.ref, '--puppetfile', '--verbose', r10k_loglevel ] + cmd_str = ' '.join(map(lambda x: pipes.quote(x), cmd)) if self.verbose > 2: LOG.debug("Cmd: {}".format(pp(cmd)))