]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Adding handler object to base application
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 20 Aug 2018 10:48:08 +0000 (12:48 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 20 Aug 2018 10:48:08 +0000 (12:48 +0200)
lib/webhooks/base_app.py
lib/webhooks/r10k.py

index 2a3f1b614c7fbf4b1ca670b1ceba9cffc509cca6..7c8cc2bb1a932defea9b6125f6378cedf6ff37d6 100644 (file)
@@ -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
 
     # -----------------------------------------------------------
index 873c649429fb45b15c73eabb0d63cc46fefaeb25..8f3d48689d221bdd6ad01c4c63e193a39399e3c8 100644 (file)
@@ -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)))