diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-05-13 16:41:32 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-06-05 14:03:13 +0300 |
commit | a644da27a5b3c925fef60431fc2bf9404ade14fa (patch) | |
tree | 5eb7628d5039fdce57bc38ddd41dbcc5c4c53098 /gbp/scripts/buildpackage.py | |
parent | ecf1b23ddfede5f3439fb91f9ad6cfcb5724ebe3 (diff) | |
download | git-buildpackage-a644da27a5b3c925fef60431fc2bf9404ade14fa.tar.gz git-buildpackage-a644da27a5b3c925fef60431fc2bf9404ade14fa.tar.bz2 git-buildpackage-a644da27a5b3c925fef60431fc2bf9404ade14fa.zip |
notifications: make notify() more generic
In order to be able to re-use it in other tools than git-buildpackage.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/scripts/buildpackage.py')
-rwxr-xr-x | gbp/scripts/buildpackage.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py index 54e66bd2..21424755 100755 --- a/gbp/scripts/buildpackage.py +++ b/gbp/scripts/buildpackage.py @@ -628,11 +628,12 @@ def main(argv): if options.export_dir and options.purge and not retval: RemoveTree(export_dir)() - if source and not gbp.notifications.notify(source.changelog, - not retval, - options.notify): - gbp.log.err("Failed to send notification") - retval = 1 + if source: + summary, msg = gbp.notifications.build_msg(source.changelog, + not retval) + if not gbp.notifications.notify(summary, msg, options.notify): + gbp.log.err("Failed to send notification") + retval = 1 return retval |