Projet

Général

Profil

0001-store-binpath-on-init-and-use-this-copy-later-on.patch

Raphaël Gaziano, 12 décembre 2013 09:54

Télécharger (1,49 ko)

Voir les différences:

Subject: [PATCH] store binpath on init and use this copy later on

 eopayment/sips.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
eopayment/sips.py
103 103

  
104 104
    def __init__(self, options, logger=LOGGER):
105 105
        self.options = options
106
        self.binpath = self.options.pop(BINPATH)
106 107
        self.logger = logger
107 108
        self.logger.debug('initializing sips payment class with %s' % options)
108 109

  
109 110
    def execute(self, executable, params):
110 111
        if PATHFILE in self.options:
111 112
            params[PATHFILE] = self.options[PATHFILE]
112
        executable = os.path.join(self.options.pop(BINPATH), executable)
113
        executable = os.path.join(self.binpath, executable)
113 114
        args = [executable] + ["%s=%s" % p for p in params.iteritems()]
114 115
        self.logger.debug('executing %s' % args)
115 116
        result,_ = subprocess.Popen(' '.join(args),
......
143 144
            params['customer_email'] = email
144 145
        if next_url:
145 146
            params['normal_return_url'] = next_url
146
        params.pop('binpath')
147 147
        code, error, form = self.execute('request', params)
148 148
        if int(code) == 0:
149 149
            return params[ORDER_ID], HTML, form
150
-