From 5feb66707d84d6644158b5c9b848628a4814610f Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 25 May 2015 20:14:26 -0300 Subject: [bug] Empty comes from Queue When handling this exception Python got lost because the import was incorrect. Queue.Empty comes from Queue, not from multiprocessing.Queue --- client/src/leap/soledad/client/encdecpool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client/src') diff --git a/client/src/leap/soledad/client/encdecpool.py b/client/src/leap/soledad/client/encdecpool.py index c0a05d38..d9a72b25 100644 --- a/client/src/leap/soledad/client/encdecpool.py +++ b/client/src/leap/soledad/client/encdecpool.py @@ -23,6 +23,7 @@ during synchronization. import multiprocessing +import Queue import json import logging @@ -186,7 +187,7 @@ class SyncEncrypterPool(SyncEncryptDecryptPool): try: doc = self._sync_queue.get(True, self.ENCRYPT_LOOP_PERIOD) self._encrypt_doc(doc) - except multiprocessing.Queue.Empty: + except Queue.Empty: pass def _encrypt_doc(self, doc): -- cgit v1.2.3