]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Fixing lib/webhooks/deploy.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 25 Jan 2017 09:52:30 +0000 (10:52 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 25 Jan 2017 09:52:30 +0000 (10:52 +0100)
lib/webhooks/deploy.py

index f1cdd7ac8bc499a2da99cf9fdccc52125d5a4300..4361bc4f050f4fa3049fd9ade302192b584ddb11 100644 (file)
@@ -138,6 +138,7 @@ class WebhookDeployApp(object):
 
         if 'REQUEST_METHOD' in os.environ:
 
+            sys.stderr.write("Trying to open logfile {!r} ...\n".format(self.logfile))
             # we are in a CGI environment
             if os.path.isdir(self.log_directory) and os.access(self.log_directory, os.W_OK):
                 lh_file = logging.FileHandler(
@@ -166,6 +167,10 @@ class WebhookDeployApp(object):
     def __call__(self):
         """Helper method to make the resulting object callable."""
 
+        print("Content-Type: text/plain;charset=utf-8")
+        print()
+        print("Python CGI läuft")
+
         log.info("Starting ...")
         log.debug("Base directory: {!r}".format(self.base_dir))