From 9b9112d5d7fa3570f0757b1fea776df7c4e59c75 Mon Sep 17 00:00:00 2001 From: Mathieu Comandon Date: Wed, 13 Jun 2012 13:43:35 +0200 Subject: [PATCH] common.py pep8 compliance --- eopayment/common.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/eopayment/common.py b/eopayment/common.py index 443275b..272ec82 100644 --- a/eopayment/common.py +++ b/eopayment/common.py @@ -4,8 +4,8 @@ import random import logging from datetime import date -__all__ = [ 'PaymentCommon', 'URL', 'HTML', 'RANDOM', 'RECEIVED', 'ACCEPTED', -'PAID', 'ERROR' ] +__all__ = ['PaymentCommon', 'URL', 'HTML', 'RANDOM', 'RECEIVED', 'ACCEPTED', + 'PAID', 'ERROR'] LOGGER = logging.getLogger(__name__) @@ -19,6 +19,7 @@ ACCEPTED = 2 PAID = 3 ERROR = 99 + class PaymentResponse(object): '''Holds a generic view on the result of payment transaction response. @@ -82,9 +83,11 @@ class PaymentCommon(object): while True: parts = [RANDOM.choice(choices) for x in range(length)] id = ''.join(parts) - name = '%s_%s_%s' % (str(date.today()), '-'.join(prefixes), str(id)) + name = '%s_%s_%s' % (str(date.today()), + '-'.join(prefixes), str(id)) try: - fd=os.open(os.path.join(self.PATH, name), os.O_CREAT|os.O_EXCL) + fd = os.open(os.path.join(self.PATH, name), + os.O_CREAT | os.O_EXCL) except: raise else: