diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-08-03 21:20:22 -0300 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-08-03 22:04:29 -0300 |
commit | d9b535e5c0fba267150fd3a7d0cbf00245860bec (patch) | |
tree | 633a4899969d5b4f5c855ed88de8e5c5e7a5f51c | |
parent | ae7ed14ef68abe7a97e82224594140c626cf7820 (diff) |
Use python3-notify2
Closes: #870595
Thanks: Alexandre Detiste
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | gbp/notifications.py | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/debian/control b/debian/control index 8f3a2876..df134a00 100644 --- a/debian/control +++ b/debian/control @@ -55,7 +55,7 @@ Depends: ${python3:Depends}, Recommends: pristine-tar (>= 0.5), cowbuilder | pbuilder | sbuild, python3-requests -Suggests: python3-notify, unzip, sudo +Suggests: python3-notify2, unzip, sudo Description: Suite to help with Debian packages in Git repositories This package contains the following tools: * gbp import-{dsc,dscs}: import existing Debian source packages into a git diff --git a/gbp/notifications.py b/gbp/notifications.py index 51cbe416..9b2f1613 100644 --- a/gbp/notifications.py +++ b/gbp/notifications.py @@ -27,12 +27,15 @@ def enable_notifications(): # Avoid GTK+ cannot open display warning: warnings.simplefilter("ignore") try: - import pynotify - notify_module = pynotify + import notify2 + notify_module = notify2 except (ImportError, RuntimeError): return False - return notify_module.init("git-buildpackage") + try: + return notify_module.init("git-buildpackage") + except Exception: + return False def build_msg(cp, success): |