From 6cb700b30290230c92d0460b51257cdc2621fdb7 Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 31 Jul 2017 12:26:15 +0200 Subject: [PATCH] import threading and queue.Empty Fixes the undefined name on line 644 --- plugins/Trayicon/lib/notificationicon.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/Trayicon/lib/notificationicon.py b/plugins/Trayicon/lib/notificationicon.py index bc7e2175..128c3beb 100644 --- a/plugins/Trayicon/lib/notificationicon.py +++ b/plugins/Trayicon/lib/notificationicon.py @@ -8,6 +8,11 @@ import os import uuid import time import gevent +import threading +try: + from queue import Empty as queue_Empty # Python 3 +except ImportError: + from Queue import Empty as queue_Empty # Python 2 __all__ = ['NotificationIcon'] @@ -666,7 +671,7 @@ class NotificationIcon(object): while not self._pumpqueue.empty(): callable = self._pumpqueue.get(False) callable() - except Queue.Empty: + except queue_Empty: pass @@ -721,4 +726,4 @@ if __name__ == "__main__": def goodbye(): print "You are now leaving the Python sector." - ni._run() \ No newline at end of file + ni._run()