From: Frank Brehm Date: Wed, 25 Jan 2017 09:52:30 +0000 (+0100) Subject: Fixing lib/webhooks/deploy.py X-Git-Tag: 0.8.4~62 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=fd91a144cb91bd68ccbe9403d2ba6264d074a0a1;p=pixelpark%2Fpuppetmaster-webhooks.git Fixing lib/webhooks/deploy.py --- diff --git a/lib/webhooks/deploy.py b/lib/webhooks/deploy.py index f1cdd7a..4361bc4 100644 --- a/lib/webhooks/deploy.py +++ b/lib/webhooks/deploy.py @@ -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))