Skip to content

Commit 83b1f96

Browse files
DTPAYWONE-564:
- Fixed use of "is" and "is not" with literal values.
1 parent 73e1078 commit 83b1f96

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

hyperwallet/utils/apiclient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _makeRequest(self,
116116
}]
117117
})
118118

119-
if response.status_code is 204:
119+
if response.status_code == 204:
120120
return {}
121121

122122
self.__checkResponseHeaderContentType(response)
@@ -211,7 +211,7 @@ def __checkResponseHeaderContentType(self, response):
211211

212212
contentType = response.headers['Content-Type']
213213
expectedContentType = 'application/jose+json' if self.encrypted else 'application/json'
214-
invalidContentType = response.status_code is not 204 and contentType is not None and expectedContentType not in contentType
214+
invalidContentType = response.status_code != 204 and contentType is not None and expectedContentType not in contentType
215215
if (invalidContentType):
216216
raise HyperwalletAPIException('Invalid Content-Type specified in Response Header')
217217

0 commit comments

Comments
 (0)