Commit ba1f87e3 authored by Amos Latteier's avatar Amos Latteier

Slight improvement suggested by Jim. Also fixed a doc string typo.

parent c71953eb
...@@ -312,12 +312,12 @@ class zhttp_channel(http_channel): ...@@ -312,12 +312,12 @@ class zhttp_channel(http_channel):
if not self.working: if not self.working:
if self.queue: if self.queue:
self.working=1 self.working=1
module_name, request, response=self.queue[0] try: module_name, request, response=self.queue.pop(0)
self.queue=self.queue[1:] except: return
handle(module_name, request, response) handle(module_name, request, response)
def done(self): def done(self):
"Called when a pushing request is finished" "Called when a publishing request is finished"
self.working=0 self.working=0
self.work() self.work()
......
...@@ -312,12 +312,12 @@ class zhttp_channel(http_channel): ...@@ -312,12 +312,12 @@ class zhttp_channel(http_channel):
if not self.working: if not self.working:
if self.queue: if self.queue:
self.working=1 self.working=1
module_name, request, response=self.queue[0] try: module_name, request, response=self.queue.pop(0)
self.queue=self.queue[1:] except: return
handle(module_name, request, response) handle(module_name, request, response)
def done(self): def done(self):
"Called when a pushing request is finished" "Called when a publishing request is finished"
self.working=0 self.working=0
self.work() self.work()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment