]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Fix order of the command in run_hook of r10k.py
authorReinhard Schmitz <reinhard.schmitz.ext@digitaspixelpark.com>
Mon, 11 Apr 2022 14:16:24 +0000 (16:16 +0200)
committerRobert Waffen <rw@betadots.de>
Mon, 11 Apr 2022 14:16:24 +0000 (16:16 +0200)
lib/webhooks/r10k.py

index 77dac4d5186d3d05ebc7e91e1d87ee98f23d96c1..00fde48020157d24500ee06ecb2bd950f516a58e 100644 (file)
@@ -223,14 +223,14 @@ class R10kHookApp(BaseHookApp):
 
             if not self.exec_r10k():
                 LOG.warn(_("Executing {!r} was not successful.").format(str(self.r10k_bin)))
-                return
+
+            self.del_env_cache()
 
             if not self.generate_puppet_types():
                 what = '{c} generate types --environment {e}'.format(c=self.puppet_bin, e=self.ref)
                 LOG.warn(_("{!r} was not successful.").format(what))
-                return
 
-            return self.del_env_cache()
+            return
 
         finally:
             lock = None