mobyt: compare response as string (#44067)

This commit is contained in:
Valentin Deniaud 2020-06-16 11:17:16 +02:00
parent d105deefe7
commit 1aa5b74779
1 changed files with 1 additions and 1 deletions

View File

@ -59,6 +59,6 @@ class MobytSMSGateway(SMSResource):
r = self.requests.post(self.URL, data=params)
except requests.RequestException as e:
raise APIError('MobyT error: POST failed, %s' % e)
if r.content[:2] != "OK":
if r.text[:2] != "OK":
raise APIError('MobyT error: response is not "OK"')
return None