From 8b8f2d1d8acab406b86a5c5a8cd0ddfd7efe6ab1 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Sat, 16 Jul 2022 15:48:38 +0800 Subject: [PATCH] nvchecker-notify: try Notify 0.8 fixes #217. --- scripts/nvchecker-notify | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/nvchecker-notify b/scripts/nvchecker-notify index f082f23..dcc8ace 100755 --- a/scripts/nvchecker-notify +++ b/scripts/nvchecker-notify @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # MIT licensed -# Copyright (c) 2020 lilydjwg , et al. +# Copyright (c) 2020,2022 lilydjwg , et al. ''' A simple wrapper to show desktop notifications while running nvchecker. @@ -11,7 +11,10 @@ import subprocess import json import gi -gi.require_version('Notify', '0.7') +try: + gi.require_version('Notify', '0.8') +except ValueError: + gi.require_version('Notify', '0.7') from gi.repository import Notify def get_args():