spei-python 0.48.0__py3-none-any.whl → 0.48.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
spei/resources/mensaje.py CHANGED
@@ -17,8 +17,9 @@ class Mensaje(BaseModel):
17
17
 
18
18
  @classmethod
19
19
  def parse_xml(cls, mensaje): # noqa: WPS210
20
- parser = etree.XMLParser(recover=True)
21
- mensaje = etree.fromstring(mensaje) # noqa: S320
20
+ decoded = mensaje.decode('latin1').replace('&', '&')
21
+ encoded = decoded.encode('utf-8')
22
+ mensaje = etree.fromstring(encoded) # noqa: S320
22
23
  body = mensaje.find(
23
24
  '{http://schemas.xmlsoap.org/soap/envelope/}Body',
24
25
  )
@@ -27,8 +28,7 @@ class Mensaje(BaseModel):
27
28
 
28
29
  if ordenpago is not None:
29
30
  element = etree.fromstring( # noqa: S320
30
- bytes(ordenpago.text, encoding='cp850'),
31
- parser,
31
+ bytes(ordenpago.text.strip(), encoding='cp850'),
32
32
  )
33
33
  categoria = element.attrib['categoria']
34
34
 
@@ -41,7 +41,7 @@ class Mensaje(BaseModel):
41
41
 
42
42
  if respuesta is not None:
43
43
  element = etree.fromstring( # noqa: S320
44
- bytes(respuesta.text, encoding='cp850'),
44
+ bytes(respuesta.text.strip(), encoding='cp850'),
45
45
  )
46
46
  categoria = element.attrib['categoria']
47
47
  return cls(categoria=categoria, respuesta=element)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spei-python
3
- Version: 0.48.0
3
+ Version: 0.48.2
4
4
  Summary:
5
5
  Author: tech
6
6
  Author-email: tech@fondeadora.com
@@ -20,7 +20,7 @@ spei/resources/__init__.py,sha256=cJL9KI0ZBKHcDN5me8yuvschQMW1HH_bpLS7TnLXZw4,48
20
20
  spei/resources/acuse.py,sha256=y7j2e99pJ7LYprZvhVpf_OTLONdtNJJ49uK_jddOCRg,5475
21
21
  spei/resources/cda.py,sha256=AHGPC6JUx9NYWAtJogxVDyXpISz_psOdfUiuD46h73g,2327
22
22
  spei/resources/ensesion.py,sha256=fky_ejeQ39x9kj8yMT3hi6ee4vQrAi6QtbjBJL-JA_c,1585
23
- spei/resources/mensaje.py,sha256=aIgRzAPDrRWAuP6CaB2VOIrqjWpPnpYITw3P0tsbN18,1582
23
+ spei/resources/mensaje.py,sha256=3lb1PwTrfz4aCGrwp2Tv-hGT7DLYz9tMkqp7QTUZzZI,1642
24
24
  spei/resources/orden.py,sha256=_m0pDnB51JA4GyxcmDtZVauuVvDLcKjAMgqXeMtrJKQ,6096
25
25
  spei/resources/payments.py,sha256=pt8xvwRUfcTq3jEFlnG28T4mE7MYpZSCkXgseqD22yY,8103
26
26
  spei/resources/respuesta.py,sha256=RKzkv52zLzm5BBjCyxrC75KZT9rUKFLwedd-JDZ3uNU,1188
@@ -34,6 +34,6 @@ spei/types/sice.py,sha256=xFSoiLklRNWXoWwZXpSN8-SdkliNK23_MZbhcOc7a9s,222
34
34
  spei/types/spei.py,sha256=-q37jEKyxyg5yUVg9rmA_-d6u0dCg2e7LlAUbKFxAGg,4735
35
35
  spei/utils.py,sha256=Lje_sg6hLKQxsPmqf7ovVKKVcGZi7LlgNNg1MRtWnRo,247
36
36
  spei/validators.py,sha256=1b-brOmNesdiUi2X0LV0-Km4Sh6RGNeKNeAxshQXtOs,742
37
- spei_python-0.48.0.dist-info/METADATA,sha256=JjCOefCcbnZPwfIqWeMtdzEbbUl0K6eeDfO_BkftRgg,3812
38
- spei_python-0.48.0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
39
- spei_python-0.48.0.dist-info/RECORD,,
37
+ spei_python-0.48.2.dist-info/METADATA,sha256=xf2j8wukeT4qhjiuUi0R1pFZ6rU4rbMOKifiW4Mt2jo,3812
38
+ spei_python-0.48.2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
39
+ spei_python-0.48.2.dist-info/RECORD,,