This commit is contained in:
Mauricio Baeza 2021-02-12 19:37:11 -06:00
commit 952dcba7ae
4 changed files with 19 additions and 11 deletions

View File

@ -1,5 +1,10 @@
v 1.41.2 [13-Feb-2021]
v 1.41.3 [12-Feb-2021]
----------------------
- Error - Ticket #3
v 1.41.2 [12-Feb-2021]
----------------------
- Error - Ticket #2

View File

@ -1,2 +1,2 @@
1.41.2
1.41.3

View File

@ -100,6 +100,17 @@ class PACFinkok(object):
return self._error
def _validate_result(self, result):
if hasattr(result, 'Incidencias') and not result.Incidencias is None:
fault = result.Incidencias.Incidencia[0]
cod_error = fault.CodigoError.encode('utf-8').decode()
msg_error = fault.MensajeIncidencia.encode('utf-8').decode()
error = 'Error: {}\n{}'.format(cod_error, msg_error)
if cod_error == '307':
return result
self._error = self.CODE.get(cod_error, error)
return {}
if hasattr(result, 'CodEstatus'):
ce = result.CodEstatus
if ce is None:
@ -121,14 +132,6 @@ class PACFinkok(object):
log.error('CodEstatus', type(ce), ce)
return result
if hasattr(result, 'Incidencias'):
fault = result.Incidencias.Incidencia[0]
cod_error = fault.CodigoError.encode('utf-8')
msg_error = fault.MensajeIncidencia.encode('utf-8')
error = 'Error: {}\n{}'.format(cod_error, msg_error)
self._error = self.CODE.get(cod_error, error)
return {}
return result
def _get_result(self, client, method, args):

View File

@ -42,7 +42,7 @@ except ImportError:
DEBUG = DEBUG
VERSION = '1.41.2'
VERSION = '1.41.3'
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)