Commit 6147553f by Juan Pablo dure

limpieza de codigo

1 parent e096a926
......@@ -59,9 +59,9 @@ class FosaDiaria():
n = 0
while test:
arc = self._BuscarExcelDescargado(tmp)
print(arc, n)
n = n + 1
if not arc == False:
print(arc, n)
test = False
if n > 70:
return " "
......@@ -69,22 +69,13 @@ class FosaDiaria():
def _BuscarExcelDescargado(self,tmp):
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)
#print(cmd)
#print(rte)
#Lines = str(rte).split("\n")
sleep(0.1)
file1 = open(tmp, 'r')
Lines = file1.readlines()
for line in Lines:
der = str(line).split(" ")
#print(1,type(line),type(der))
#print(2,der)
archivo = f"""{self.CarpetaDescarga}{der[-1]}"""
#print(3,line,der,der[-1],archivo)
print(archivo)
rta = archivo.replace("\n","")
file1.close()
os.system(f"""rm {tmp}""")
......@@ -93,6 +84,6 @@ class FosaDiaria():
def LimpiarCarpertaDescarga(self):
try:
os.system(f"""rm {self.CarpetaDescarga}{self.cabezaera}*""")
sleep(0.5)
sleep(0.1)
except Exception as E:
print(f"Error al intentar borrar planillas diarias anteriores: {str(E)}")
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!