summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2018-03-26 07:50:12 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2018-07-25 08:14:25 (GMT)
commit79735f6418dd3c130cfcd28133e973f455baa1c9 (patch)
treec609188b6ba40d4ef5f231d191de6a601e453593
parentf21d66291277dc596a9bdc3d6ea51c4c4d8d1226 (diff)
downloadeopayment-79735f6418dd3c130cfcd28133e973f455baa1c9.zip
eopayment-79735f6418dd3c130cfcd28133e973f455baa1c9.tar.gz
eopayment-79735f6418dd3c130cfcd28133e973f455baa1c9.tar.bz2
python3: use items instead of iteritems
-rw-r--r--eopayment/ogone.py2
-rw-r--r--eopayment/sips.py2
-rw-r--r--eopayment/sips2.py2
-rw-r--r--eopayment/spplus.py2
-rw-r--r--eopayment/systempayv2.py6
-rw-r--r--eopayment/tipi.py2
6 files changed, 8 insertions, 8 deletions
diff --git a/eopayment/ogone.py b/eopayment/ogone.py
index 14295a5..484df8c 100644
--- a/eopayment/ogone.py
+++ b/eopayment/ogone.py
@@ -517,7 +517,7 @@ class Payment(PaymentCommon):
params['EMAIL'] = email
if description:
params['COM'] = description
- for key, value in kwargs.iteritems():
+ for key, value in kwargs.items():
params[key.upper()] = value
params['SHASIGN'] = self.sha_sign_in(params)
# uniformize all values to UTF-8 string
diff --git a/eopayment/sips.py b/eopayment/sips.py
index 8201aab..ced03a8 100644
--- a/eopayment/sips.py
+++ b/eopayment/sips.py
@@ -112,7 +112,7 @@ class Payment(PaymentCommon):
if PATHFILE in self.options:
params[PATHFILE] = self.options[PATHFILE]
executable = os.path.join(self.binpath, executable)
- args = [executable] + ["%s=%s" % p for p in params.iteritems()]
+ args = [executable] + ["%s=%s" % p for p in params.items()]
self.logger.debug('executing %s' % args)
result,_ = subprocess.Popen(' '.join(args),
stdout=subprocess.PIPE, shell=True).communicate()
diff --git a/eopayment/sips2.py b/eopayment/sips2.py
index 78a407f..ef709e3 100644
--- a/eopayment/sips2.py
+++ b/eopayment/sips2.py
@@ -140,7 +140,7 @@ class Payment(PaymentCommon):
def encode_data(self, data):
return u'|'.join(u'%s=%s' % (unicode(key), unicode(value))
- for key, value in data.iteritems())
+ for key, value in data.items())
def seal_data(self, data):
s = self.encode_data(data)
diff --git a/eopayment/spplus.py b/eopayment/spplus.py
index ab27f29..e8041e4 100644
--- a/eopayment/spplus.py
+++ b/eopayment/spplus.py
@@ -178,7 +178,7 @@ class Payment(PaymentCommon):
form = urlparse.parse_qs(query_string)
if not set(form) >= set([REFERENCE, ETAT, REFSFP]):
raise ResponseError()
- for key, value in form.iteritems():
+ for key, value in form.items():
form[key] = value[0]
logger.debug('received query_string %s' % query_string)
logger.debug('parsed as %s' % form)
diff --git a/eopayment/systempayv2.py b/eopayment/systempayv2.py
index 8d1c12f..47ae443 100644
--- a/eopayment/systempayv2.py
+++ b/eopayment/systempayv2.py
@@ -173,7 +173,7 @@ EXTRA_RESULT_MAP = {
def add_vads(kwargs):
new_vargs = {}
- for k, v in kwargs.iteritems():
+ for k, v in kwargs.items():
if k.startswith('vads_'):
new_vargs[k] = v
else:
@@ -346,14 +346,14 @@ class Payment(PaymentCommon):
'name': force_text(field_name),
'value': force_text(field_value),
}
- for field_name, field_value in fields.iteritems()])
+ for field_name, field_value in fields.items()])
return transaction_id, FORM, form
def response(self, query_string, **kwargs):
fields = urlparse.parse_qs(query_string, True)
if not set(fields) >= set([SIGNATURE, VADS_CTX_MODE, VADS_AUTH_RESULT]):
raise ResponseError()
- for key, value in fields.iteritems():
+ for key, value in fields.items():
fields[key] = value[0]
copy = fields.copy()
bank_status = []
diff --git a/eopayment/tipi.py b/eopayment/tipi.py
index de131b1..68db4f0 100644
--- a/eopayment/tipi.py
+++ b/eopayment/tipi.py
@@ -146,7 +146,7 @@ class Payment(PaymentCommon):
fields = parse_qs(query_string, True)
if not set(fields) >= set(['refdet', 'resultrans']):
raise ResponseError()
- for key, value in fields.iteritems():
+ for key, value in fields.items():
fields[key] = value[0]
refdet = fields.get('refdet')
if refdet is None: