summaryrefslogtreecommitdiff
path: root/portato/waiting_queue.py
diff options
context:
space:
mode:
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)
&id=6d3b88dbe7a72377db9c853781593287f9cbcfa5&follow=1'>updated howtonecoro1-14/+24 2007-07-20new Plugin Schemenecoro1-5/+4 2007-07-20new Plugin Schemenecoro1-1/+1 2007-07-20new Plugin Schemenecoro9-162/+214 2007-07-13fixesnecoro4-27/+37 2007-07-13new fancier log outputnecoro14-127/+116 2007-07-11added SIGSTOP/SIGCONT support; SIGTERM now works ;)necoro8-208/+275 2007-07-09bug in shutdown pluginnecoro2-5/+12 2007-07-09added resume_loop pluginnecoro1-1/+1 2007-07-09added resume_loop pluginnecoro10-22/+162 2007-07-07some more documentationnecoro6-4/+108 2007-07-07Some documentation worknecoro7-18/+129