Skip to content

Commit 22c8ae0

Browse files
authored
Change check of POST response result
This modified the check as `text` has been changed in the Requests API. In order to make the code compatible with the JSON result, we check `resp.status_code` instead.
1 parent 5857b56 commit 22c8ae0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/post/forum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def create_post(self, title, content, board):
4040
"body": content
4141
})
4242

43-
if resp.text != "OK":
43+
if resp.status_code != 200:
4444
print("Post failed! Response: %s" %resp.text)
4545

4646
return resp.json()

0 commit comments

Comments
 (0)