Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
Pruebas-RTO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 6147553f
authored
2023-10-03 11:22:51 -0300
by
Juan Pablo dure
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
limpieza de codigo
1 parent
e096a926
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
fosadiaria.py
fosadiaria.py
View file @
6147553
...
@@ -59,9 +59,9 @@ class FosaDiaria():
...
@@ -59,9 +59,9 @@ class FosaDiaria():
n
=
0
n
=
0
while
test
:
while
test
:
arc
=
self
.
_BuscarExcelDescargado
(
tmp
)
arc
=
self
.
_BuscarExcelDescargado
(
tmp
)
print
(
arc
,
n
)
n
=
n
+
1
n
=
n
+
1
if
not
arc
==
False
:
if
not
arc
==
False
:
print
(
arc
,
n
)
test
=
False
test
=
False
if
n
>
70
:
if
n
>
70
:
return
" "
return
" "
...
@@ -69,22 +69,13 @@ class FosaDiaria():
...
@@ -69,22 +69,13 @@ class FosaDiaria():
def
_BuscarExcelDescargado
(
self
,
tmp
):
def
_BuscarExcelDescargado
(
self
,
tmp
):
rta
=
False
rta
=
False
#cmd = f"""ls {self.CarpetaDescarga} -ls |grep {self.cabezaera}| grep xls | grep -v crdownload""".split(" ")
#rte = subprocess.check_output([grepfile])
os
.
system
(
grepfile
)
os
.
system
(
grepfile
)
#print(cmd)
#print(rte)
#Lines = str(rte).split("\n")
sleep
(
0.1
)
sleep
(
0.1
)
file1
=
open
(
tmp
,
'r'
)
file1
=
open
(
tmp
,
'r'
)
Lines
=
file1
.
readlines
()
Lines
=
file1
.
readlines
()
for
line
in
Lines
:
for
line
in
Lines
:
der
=
str
(
line
)
.
split
(
" "
)
der
=
str
(
line
)
.
split
(
" "
)
#print(1,type(line),type(der))
#print(2,der)
archivo
=
f
"""{self.CarpetaDescarga}{der[-1]}"""
archivo
=
f
"""{self.CarpetaDescarga}{der[-1]}"""
#print(3,line,der,der[-1],archivo)
print
(
archivo
)
rta
=
archivo
.
replace
(
"
\n
"
,
""
)
rta
=
archivo
.
replace
(
"
\n
"
,
""
)
file1
.
close
()
file1
.
close
()
os
.
system
(
f
"""rm {tmp}"""
)
os
.
system
(
f
"""rm {tmp}"""
)
...
@@ -93,6 +84,6 @@ class FosaDiaria():
...
@@ -93,6 +84,6 @@ class FosaDiaria():
def
LimpiarCarpertaDescarga
(
self
):
def
LimpiarCarpertaDescarga
(
self
):
try
:
try
:
os
.
system
(
f
"""rm {self.CarpetaDescarga}{self.cabezaera}*"""
)
os
.
system
(
f
"""rm {self.CarpetaDescarga}{self.cabezaera}*"""
)
sleep
(
0.
5
)
sleep
(
0.
1
)
except
Exception
as
E
:
except
Exception
as
E
:
print
(
f
"Error al intentar borrar planillas diarias anteriores: {str(E)}"
)
print
(
f
"Error al intentar borrar planillas diarias anteriores: {str(E)}"
)
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment