]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Disabling mails on not existing projects in lib/webhooks/deploy.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 28 Oct 2022 15:25:37 +0000 (17:25 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 28 Oct 2022 15:25:37 +0000 (17:25 +0200)
lib/webhooks/deploy.py

index 803ed5bf737ef8bc285bd443eeeff677a2fe073b..6cec361164d203dd409d51757c8ecd712b520adb 100644 (file)
@@ -179,12 +179,10 @@ class WebhookDeployApp(BaseHookApp):
                 cfg['name'] = project_key
             full_name = ns + '/' + pname
 
-            # if self.verbose > 1:
             LOG.info("Searching for {n!r} branch {b!r} in config {k!r} ...".format(
                 n=self.full_name, b=self.ref, k=project_key))
 
             if self.full_name != full_name:
-                # if self.verbose > 1:
                 LOG.info("Project {k!r} => {n!r} does not match.".format(
                     k=project_key, n=full_name))
                 continue
@@ -198,8 +196,9 @@ class WebhookDeployApp(BaseHookApp):
             LOG.info("Found project {!r}.".format(project_key))
             return self.deploy(cfg)
 
-        msg = _("Could not find a definition for project {!r}.").format(self.full_name)
-        self.error_data.append(msg)
+        msg = _("Could not find a definition for project {n!r}, branch {b!r}.").format(
+                n=self.full_name, b=self.ref)
+        # self.error_data.append(msg)
         LOG.error(msg)
 
         return True