diff options
Diffstat (limited to 'gbp/scripts/common/hook.py')
-rw-r--r-- | gbp/scripts/common/hook.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gbp/scripts/common/hook.py b/gbp/scripts/common/hook.py index 7867b269..bcaf3cd9 100644 --- a/gbp/scripts/common/hook.py +++ b/gbp/scripts/common/hook.py @@ -17,14 +17,20 @@ """Common code for runniing hooks""" from gbp.command_wrappers import RunAtCommand +import gbp.log class Hook(RunAtCommand): "A hook run by one of the scripts" def __init__(self, name, cmd, extra_env): RunAtCommand.__init__(self, cmd, shell=True, extra_env=extra_env) + self.name = name self.run_error = '%s-hook %s' % (name, self.run_error) + def __call__(self, *args, **kwargs): + gbp.log.info("Running %s hook" % self.name) + return RunAtCommand.__call__(self, *args, **kwargs) + @staticmethod def md(a, b): "Merge two dictionaires a and b into a new one" |