Skip to content

Commit

Permalink
revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
felipao-mx committed Apr 19, 2022
1 parent 5723236 commit 316042c
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 1,240 deletions.
12 changes: 0 additions & 12 deletions cep/exc.py

This file was deleted.

17 changes: 1 addition & 16 deletions cep/transferencia.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,9 @@

import clabe
from lxml import etree
from requests import HTTPError

from .client import Client
from .cuenta import Cuenta
from .exc import CepError, MaxRequestError

MAX_REQUEST_ERROR_MESSAGE = (
b'Lo sentimos, pero ha excedido el número máximo '
b'de consultas en este portal'
)


@dataclass
Expand Down Expand Up @@ -43,15 +36,7 @@ def validar(
)
if not client:
return None

try:
xml = cls._descargar(client, 'XML')
except HTTPError as exc:
raise CepError from exc

if MAX_REQUEST_ERROR_MESSAGE in xml:
raise MaxRequestError

xml = cls._descargar(client, 'XML')
resp = etree.fromstring(xml)

ordenante = Cuenta.from_etree(resp.find('Ordenante'))
Expand Down
Loading

0 comments on commit 316042c

Please sign in to comment.