Skip to content

Commit 5d037f8

Browse files
committed
catch exceptions with price update
1 parent c86ae6d commit 5d037f8

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

core/watch.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ def find(api, defId, buy=None, num=0):
2222
return (lowest, num)
2323

2424
for defId in defIds:
25-
result = find(api, defId)
26-
q.put({
27-
'defId': defId,
28-
'lowestBIN': result[0],
29-
'num': result[1]
30-
})
25+
try:
26+
result = find(api, defId)
27+
q.put({
28+
'defId': defId,
29+
'lowestBIN': result[0],
30+
'num': result[1]
31+
})
32+
except FutError as e:
33+
q.put(e)
3134

3235

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

0 commit comments

Comments
 (0)