From de3436eafc1f1d5f68fd484dda9b74f493660296 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 15 Feb 2017 16:06:44 +0100 Subject: [PATCH] Cosmetic changes --- lib/webhooks/__init__.py | 2 +- lib/webhooks/base_app.py | 8 ++++++-- lib/webhooks/r10k.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/webhooks/__init__.py b/lib/webhooks/__init__.py index 4dc204c..4d4ba82 100644 --- a/lib/webhooks/__init__.py +++ b/lib/webhooks/__init__.py @@ -1,6 +1,6 @@ #!/bin/env python3 # -*- coding: utf-8 -*- -__version__ = '0.4.7' +__version__ = '0.4.8' # vim: ts=4 et list diff --git a/lib/webhooks/base_app.py b/lib/webhooks/base_app.py index 074088d..56e0be1 100644 --- a/lib/webhooks/base_app.py +++ b/lib/webhooks/base_app.py @@ -569,13 +569,17 @@ class BaseHookApp(object): ts_str += '+0000' timestamp = datetime.datetime.strptime(ts_str, timeformat) email = commit['author']['email'] - committers.append((timestamp, email)) + c_name = commit['author']['name'] + committers.append((timestamp, email, c_name)) if committers: committers.sort() if self.verbose > 1: LOG.debug("Got committers: {}".format(pp(committers))) - self.mail_to_addresses.append(committers[-1][1]) + last = committers[-1] + LOG.info("Last commit by {n!r} <{m}> at {d}.".format( + n=last[2], m=last[1], d=last[0].isoformat(' '))) + self.mail_to_addresses.append(last[1]) else: LOG.debug("No committers found to append a mail address.") diff --git a/lib/webhooks/r10k.py b/lib/webhooks/r10k.py index 5dcfc59..aa9e566 100644 --- a/lib/webhooks/r10k.py +++ b/lib/webhooks/r10k.py @@ -100,7 +100,7 @@ class R10kHookApp(BaseHookApp): sys.exit(10) if not os.access(pdir, os.R_OK): - LOG.error(( + LOG.debug(( "Directory {!r} is read protected, " "cannot check existence of cert files.").format(pdir)) return -- 2.39.5