projects
/
tools
/
git-buildpackage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01470e1
)
notify: catch RuntimeError when importing pynotify
author
Markus Lehtonen
<markus.lehtonen@linux.intel.com>
Thu, 12 Jun 2014 09:04:09 +0000
(12:04 +0300)
committer
Guido Günther
<agx@sigxcpu.org>
Fri, 5 Dec 2014 14:52:19 +0000
(15:52 +0100)
Work around a problem in some distros (e.g. Fedora) where "import
pynotify" crashes in RuntimeError in some cases, e.g. when DISPLAY env
variable is not set.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/notifications.py
patch
|
blob
|
history
diff --git
a/gbp/notifications.py
b/gbp/notifications.py
index 95c4bf41131fa98f896fbe385890703b9ba6c878..9d9071a9f0ea0a91bfb450f6a4e71d063975d2e3 100644
(file)
--- a/
gbp/notifications.py
+++ b/
gbp/notifications.py
@@
-28,7
+28,7
@@
def enable_notifications():
try:
import pynotify
notify_module = pynotify
- except
ImportError
:
+ except
(ImportError, RuntimeError)
:
return False
return notify_module.init("git-buildpackage")