Skip to content

Commit 23b5f54

Browse files
committed
option bar period
1 parent 617b3ec commit 23b5f54

File tree

6 files changed

+519
-149
lines changed

6 files changed

+519
-149
lines changed

tigeropen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
55
@author: gaoan
66
"""
7-
__VERSION__ = '2.3.4'
7+
__VERSION__ = '2.3.5'

tigeropen/common/util/web_utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,13 @@ def do_request(method, url, query_string=None, headers=None, params=None, timeou
7777
raise RequestException('[' + THREAD_LOCAL.uuid + ']' + method + ' request failed. url: ' + url
7878
+ ' headers: ' + str(headers)
7979
+ ' params: ' + str(params) + ' detail: ' + str(e))
80-
response = connection.getresponse()
81-
result = response.read()
82-
80+
try:
81+
response = connection.getresponse()
82+
result = response.read()
83+
except Exception as e:
84+
raise ResponseException('[' + THREAD_LOCAL.uuid + '] read response error ' +
85+
' headers: ' + str(headers) +
86+
' params: ' + str(params))
8387
if response.status != 200:
8488
if charset:
8589
result = result.decode(charset)

0 commit comments

Comments
 (0)