Merge pull request #1060 from cclauss/patch-5

import threading and queue.Empty
This commit is contained in:
ZeroNet 2017-07-31 13:47:06 +02:00 committed by GitHub
commit 545f4964a1

View file

@ -8,6 +8,11 @@ import os
import uuid import uuid
import time import time
import gevent 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'] __all__ = ['NotificationIcon']
@ -666,7 +671,7 @@ class NotificationIcon(object):
while not self._pumpqueue.empty(): while not self._pumpqueue.empty():
callable = self._pumpqueue.get(False) callable = self._pumpqueue.get(False)
callable() callable()
except Queue.Empty: except queue_Empty:
pass pass