csc-cia-stne 0.0.99__py3-none-any.whl → 0.1.0__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.
- csc_cia_stne/ftp.py +14 -6
- {csc_cia_stne-0.0.99.dist-info → csc_cia_stne-0.1.0.dist-info}/METADATA +1 -1
- {csc_cia_stne-0.0.99.dist-info → csc_cia_stne-0.1.0.dist-info}/RECORD +6 -6
- {csc_cia_stne-0.0.99.dist-info → csc_cia_stne-0.1.0.dist-info}/WHEEL +0 -0
- {csc_cia_stne-0.0.99.dist-info → csc_cia_stne-0.1.0.dist-info}/licenses/LICENCE +0 -0
- {csc_cia_stne-0.0.99.dist-info → csc_cia_stne-0.1.0.dist-info}/top_level.txt +0 -0
csc_cia_stne/ftp.py
CHANGED
@@ -280,17 +280,26 @@ class FTP():
|
|
280
280
|
|
281
281
|
connection_ftp.perform()
|
282
282
|
|
283
|
-
|
283
|
+
try:
|
284
|
+
files_to_organize = buffer.getvalue().decode('utf-8')
|
285
|
+
except UnicodeDecodeError:
|
286
|
+
files_to_organize = buffer.getvalue().decode('latin-1')
|
287
|
+
|
288
|
+
lines_of_file = files_to_organize.splitlines()
|
289
|
+
|
290
|
+
organized_list = []
|
284
291
|
|
285
|
-
|
292
|
+
for line in lines_of_file:
|
293
|
+
parts = line.strip().split()
|
294
|
+
if parts:
|
295
|
+
nome = parts[-1]
|
296
|
+
organized_list.append(nome)
|
286
297
|
|
287
298
|
connection_ftp.close()
|
288
299
|
|
289
300
|
return {
|
290
301
|
'status': True,
|
291
|
-
'
|
292
|
-
'message': f"Arquivos listados com sucesso de {self.host}:{self.port}/{filepathftp}.",
|
293
|
-
'files': lista_arquivos
|
302
|
+
'files': organized_list
|
294
303
|
}
|
295
304
|
|
296
305
|
except Exception as e:
|
@@ -301,6 +310,5 @@ class FTP():
|
|
301
310
|
|
302
311
|
return {
|
303
312
|
'status': False,
|
304
|
-
'status_code': None,
|
305
313
|
'message': f"Falha ao listar arquivos de {self.host}:{self.port}/{filepathftp}."
|
306
314
|
}
|
@@ -2,7 +2,7 @@ csc_cia_stne/__init__.py,sha256=jwLhGpOwFCow_6cqzwLn31WcIrMzutMZtEQpLL4bQtM,2638
|
|
2
2
|
csc_cia_stne/bc_correios.py,sha256=pQAnRrcXEMrx3N1MWydZVIhEQLerh3x8-0B045zZIzk,24174
|
3
3
|
csc_cia_stne/bc_sta.py,sha256=sE-aU-ZVSAqryQrT1-nor9eAFM5npNAKF1QSm-ChhGU,28945
|
4
4
|
csc_cia_stne/email.py,sha256=K0DcgxTPKa_Rz_SJekjbW8Nw_1L9s_iuDDxZ-69bZfM,8387
|
5
|
-
csc_cia_stne/ftp.py,sha256=
|
5
|
+
csc_cia_stne/ftp.py,sha256=M9WCaq2hm56jGyszNaPinliFaZS0BNrT7VrVPMjkMg4,10988
|
6
6
|
csc_cia_stne/gcp_bigquery.py,sha256=foq8azvvv_f7uikMDslX9RcUIrx7RAS-Sn0AGW0QFQc,7231
|
7
7
|
csc_cia_stne/gcp_bucket.py,sha256=nP77BtagZ7jQq6lS88ZEa1qshzBza6e_LvhgS3_JJJk,10268
|
8
8
|
csc_cia_stne/google_drive.py,sha256=k6GnM8bxQUPbXhaK6Sa4JpWrCcJ0vzYgXP8Uexy7YR0,16073
|
@@ -32,8 +32,8 @@ csc_cia_stne/utilitarios/validations/ftp.py,sha256=LNYyS2c8eou3ML23bBtn87xJFIKSr
|
|
32
32
|
csc_cia_stne/utilitarios/validations/gcp_bucket.py,sha256=vqj70jBAkazydUCPXIdE3zzgoz8Te2cCJNX_rICX1aM,6096
|
33
33
|
csc_cia_stne/utilitarios/validations/waccess.py,sha256=8yfOrmIPUSLzbCt6P0F6vj3FkSgU_RgrJpJlRhlLyV0,7352
|
34
34
|
csc_cia_stne/utilitarios/validations/web_validator.py,sha256=HYKYSpDv1RvRjZIuwTPt-AbEz-9392MxM_O329iYuSA,5722
|
35
|
-
csc_cia_stne-0.0.
|
36
|
-
csc_cia_stne-0.0.
|
37
|
-
csc_cia_stne-0.0.
|
38
|
-
csc_cia_stne-0.0.
|
39
|
-
csc_cia_stne-0.0.
|
35
|
+
csc_cia_stne-0.1.0.dist-info/licenses/LICENCE,sha256=LPGMtgKki2C3KEZP7hDhA1HBrlq5JCHkIeStUCLEMx4,1073
|
36
|
+
csc_cia_stne-0.1.0.dist-info/METADATA,sha256=5H9EJPLrYpZK8Vf1is7VXykm_FngzrV0zj_PhEamR8c,1418
|
37
|
+
csc_cia_stne-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
38
|
+
csc_cia_stne-0.1.0.dist-info/top_level.txt,sha256=ldo7GVv3tQx5KJvwBzdZzzQmjPys2NDVVn1rv0BOF2Q,13
|
39
|
+
csc_cia_stne-0.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|