Skip to content

Commit 67ba987

Browse files
author
Hongbin Huang
committed
fix: status_code bug
1 parent b874ee6 commit 67ba987

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

easyai/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def _extract_result(self, json_result):
9999
return APIResult(images, parameters, info)
100100

101101
def _to_api_result(self, response):
102-
if response.status_code != 200:
103-
raise RuntimeError(response.status_code, response.text())
102+
if response.status != 200:
103+
raise RuntimeError(response.status, response.text())
104104

105105
r = response.json()
106106
return self._extract_result(r)

0 commit comments

Comments
 (0)