Skip to content

Commit

Permalink
[Mod] add exception type
Browse files Browse the repository at this point in the history
  • Loading branch information
vnpy committed Jul 19, 2019
1 parent 5d4d512 commit 575cb23
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vnpy/api/rest/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _run(self):
self._queue.task_done()
except Empty:
pass
except: # noqa
except Exception:
et, ev, tb = sys.exc_info()
self.on_error(et, ev, tb, None)

Expand Down Expand Up @@ -239,7 +239,6 @@ def _process_request(
"""
Sending request to server and get result.
"""
# noinspection PyBroadException
try:
request = self.sign(request)

Expand Down Expand Up @@ -270,7 +269,7 @@ def _process_request(
request.on_failed(status_code, request)
else:
self.on_failed(status_code, request)
except: # noqa
except Exception:
request.status = RequestStatus.error
t, v, tb = sys.exc_info()
if request.on_error:
Expand Down

0 comments on commit 575cb23

Please sign in to comment.