summaryrefslogtreecommitdiff
path: root/portato/waiting_queue.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 16:23:31 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 16:23:31 +0200
commitc916c961f34f47fdb25d5384370b0aed7e90ea49 (patch)
treea45c07f663b24363c9500a0298ca24bf8c007528 /portato/waiting_queue.py
parentfe58a20450b2bcb757cad27cc81522050b511300 (diff)
downloadportato-c916c961f34f47fdb25d5384370b0aed7e90ea49.tar.gz
portato-c916c961f34f47fdb25d5384370b0aed7e90ea49.tar.bz2
portato-c916c961f34f47fdb25d5384370b0aed7e90ea49.zip
EFAP
Diffstat (limited to 'portato/waiting_queue.py')
-rw-r--r--portato/waiting_queue.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/portato/waiting_queue.py b/portato/waiting_queue.py
index d946abe..33791a3 100644
--- a/portato/waiting_queue.py
+++ b/portato/waiting_queue.py
@@ -36,10 +36,9 @@ class WaitingQueue (Queue):
def put (self, method, *args, **kwargs):
self.counter += 1;
- if "caller" in kwargs:
- name = "Waiting Thread #%d (called by:%s)" % (self.counter, kwargs["caller"])
- del kwargs["caller"]
- else:
+ try:
+ name = "Waiting Thread #%d (called by:%s)" % (self.counter, kwargs.pop("caller"))
+ except KeyError:
name = "Waiting Thread #%d" % self.counter
t = self.threadClass(name = name, target = method, args = args, kwargs = kwargs)