Skip to content

Commit

Permalink
catch exceptions with price update
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjm committed Dec 2, 2015
1 parent c86ae6d commit 5d037f8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions core/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ def find(api, defId, buy=None, num=0):
return (lowest, num)

for defId in defIds:
result = find(api, defId)
q.put({
'defId': defId,
'lowestBIN': result[0],
'num': result[1]
})
try:
result = find(api, defId)
q.put({
'defId': defId,
'lowestBIN': result[0],
'num': result[1]
})
except FutError as e:
q.put(e)


def watch(q, api, defIds, length=1200):
Expand Down

0 comments on commit 5d037f8

Please sign in to comment.