From 66b6b2e8091b50e53d8911f38ecb034e32362095 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 9 Mar 2015 09:53:47 +0100 Subject: [PATCH] Remove dictionnary comprehensions to be compatible with Python 2.6 --- eopayment/__init__.py | 2 +- eopayment/ogone.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eopayment/__init__.py b/eopayment/__init__.py index 4bcb583..711e6c9 100644 --- a/eopayment/__init__.py +++ b/eopayment/__init__.py @@ -26,17 +26,17 @@ __BACKENDS = [ DUMMY, SIPS, SYSTEMPAY, SPPLUS, OGONE ] def get_backends(): '''Return a dictionnary mapping existing eopayment backends name to their description. >>> get_backends()['dummy'].description['caption'] 'Dummy payment backend' ''' - return {backend: get_backend(backend) for backend in __BACKENDS} + return dict((backend, get_backend(backend)) for backend in __BACKENDS) class Payment(object): ''' Interface to credit card online payment servers of French banks. The only use case supported for now is a unique automatic payment. >>> spplus_options = { \ 'cle': '58 6d fc 9c 34 91 9b 86 3f fd 64 ' \ diff --git a/eopayment/ogone.py b/eopayment/ogone.py index daa822d..1806214 100644 --- a/eopayment/ogone.py +++ b/eopayment/ogone.py @@ -503,17 +503,17 @@ class Payment(PaymentCommon): method='POST', fields=[{'type': 'hidden', 'name': key, 'value': params[key]} for key in params]) return reference, FORM, form def response(self, query_string): params = urlparse.parse_qs(query_string, True) - params = {key.upper(): params[key][0] for key in params} + params = dict((key.upper(), params[key][0]) for key in params) reference = params['ORDERID'] transaction_id = params['PAYID'] status = params['STATUS'] error = params['NCERROR'] signed = False if self.sha_in: signature = params.get('SHASIGN') expected_signature = self.sha_sign_out(params) -- 1.9.1