summaryrefslogtreecommitdiff
path: root/postgresqleu/trustlypayment/api.py
diff options
context:
space:
mode:
authorMagnus Hagander2018-12-15 10:05:34 +0000
committerMagnus Hagander2018-12-15 10:05:34 +0000
commitd3cbef33ecc739a7fea78ab21ea097178c204f91 (patch)
treeb56248a4d520e13197491b53eb0b3feec2d0e3b6 /postgresqleu/trustlypayment/api.py
parentf01500dcf70022e2d23b91c147a6254ac8c4e3b2 (diff)
Replace usage of has_key()
It has been deprecated, and instead we should use "in" and "not in", so make that change across the board.
Diffstat (limited to 'postgresqleu/trustlypayment/api.py')
-rw-r--r--postgresqleu/trustlypayment/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/postgresqleu/trustlypayment/api.py b/postgresqleu/trustlypayment/api.py
index a4fca9fd..9c8e268b 100644
--- a/postgresqleu/trustlypayment/api.py
+++ b/postgresqleu/trustlypayment/api.py
@@ -112,7 +112,7 @@ class TrustlyWrapper(object):
raise TrustlyException("bad http response code {0}".format(u.getcode()))
u.close()
r = json.loads(resp)
- if r.has_key('error'):
+ if 'error' in r:
# XXX log and raise generic exception!
raise TrustlyException(r['error']['message'])
if r['result']['method'] != method: