Skip to content

Commit 82c8642

Browse files
author
3np
committed
fix: do not raise error on notify-send
makes libnotify-bin actually optional
1 parent fb42d42 commit 82c8642

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

splitgpg2/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,11 @@ def default_hash_algos() -> Dict[int, HashAlgo]:
600600

601601
@staticmethod
602602
def notify(msg: str) -> None:
603-
# TODO: call into dbus directly
604-
subprocess.call(['notify-send', 'split-gpg2: {}'.format(msg)])
603+
try:
604+
# TODO: call into dbus directly
605+
subprocess.call(['notify-send', 'split-gpg2: {}'.format(msg)])
606+
except FileNotFoundError:
607+
pass
605608

606609
def request_timer(self, name: str) -> None:
607610
now = time.time()

0 commit comments

Comments
 (0)