diff options
-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): |