From 5c653c98ae8093a842ccc1218b07ac0e2b4ac823 Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Tue, 19 Oct 2010 08:23:01 +0200 Subject: [PATCH] Add a try:except:finally block in the market price fetching thread --- eos | 2 +- service/market.py | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/eos b/eos index c513ac032..7c9a59ca2 160000 --- a/eos +++ b/eos @@ -1 +1 @@ -Subproject commit c513ac03224e85d2a8d13ab9309fccf75b239a51 +Subproject commit 7c9a59ca2a2d33a33be3400efa1692343fa1f57e diff --git a/service/market.py b/service/market.py index c03fe3b5a..9f6fad638 100644 --- a/service/market.py +++ b/service/market.py @@ -32,15 +32,19 @@ class PriceWorkerThread(threading.Thread): def processUpdates(self): queue = self.queue while True: - # Grab our data and rerelease the lock - callback, requests = queue.get() + try: + # Grab our data and rerelease the lock + callback, requests = queue.get() - # Grab prices, this is the time-consuming part - if len(requests) > 0: - eos.types.Price.fetchPrices(*requests) + # Grab prices, this is the time-consuming part + if len(requests) > 0: + eos.types.Price.fetchPrices(*requests) - wx.CallAfter(callback) - queue.task_done() + wx.CallAfter(callback) + except: + pass + finally: + queue.task_done() def trigger(self, prices, callbacks): self.queue.put((callbacks, prices))