]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Adding debug output
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 9 Mar 2018 15:59:17 +0000 (16:59 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 9 Mar 2018 15:59:17 +0000 (16:59 +0100)
lib/webhooks/lock_handler.py

index 3a7e8bc3799a050de75ddd55a248122e801cf37e..2be98b694ffdb1dd006173a140aa13c5440adf0d 100644 (file)
@@ -33,7 +33,7 @@ from .obj import BaseObject
 
 from .handler import BaseHandlerError, BaseHandler
 
-__version__ = '0.2.1'
+__version__ = '0.2.2'
 
 log = logging.getLogger(__name__)
 
@@ -882,9 +882,11 @@ class LockHandler(BaseHandler):
                 os.write(fd, out)
 
                 if stay_opened:
+                    log.debug("Seeking and syncing {!r} ...".format(lockfile))
                     os.lseek(fd, 0, 0)
                     os.fsync(fd)
                 else:
+                    log.debug("Closing {!r} ...".format(lockfile))
                     os.close(fd)
                     fd = None