Commit 9708f30f by juan

Andando

1 parent c937d1d9
Showing 1 changed file with 10 additions and 8 deletions
...@@ -165,7 +165,10 @@ def report(): ...@@ -165,7 +165,10 @@ def report():
answer['header']['patente'] = plate.upper() answer['header']['patente'] = plate.upper()
answer['header']["fecha-hora"] = apollo.estaticos.FechaHora() answer['header']["fecha-hora"] = apollo.estaticos.FechaHora()
print(1,answer)
answer['header']["ingeniero"] = ing.LeerDatosUsuario(request.cookies["login"])['nombreyapellido'] answer['header']["ingeniero"] = ing.LeerDatosUsuario(request.cookies["login"])['nombreyapellido']
#answer['header']["hora"] = apollo.estaticos.Hora()
print(2,answer)
try: try:
login( login(
...@@ -178,18 +181,16 @@ def report(): ...@@ -178,18 +181,16 @@ def report():
except: except:
s.driver.quit() s.driver.quit()
return f"Error en el login" return f"Error en el login"
#try:
fingfd = FozaDiaria.BuscarDatosDominio(plate.upper(),selenium=s) fingfd = FozaDiaria.BuscarDatosDominio(plate.upper(),selenium=s)
# print(fin) print(3,answer)
#except Exception as E:
answer['header']["hora"] = apollo.estaticos.Hora()
answer['header']["hora"] = str(fingfd)
# print("EError al generar hora de finalizacion ",E)
try: try:
answer = gototec(s, answer) answer = gototec(s, answer)
except: except Exception as E:
s.driver.quit() s.driver.quit()
return f"Error yendo a las especificaciones técnicas del dominio '{plate}'." return f"Error yendo a las especificaciones técnicas del dominio '{plate}'. {str(E)}"
try: try:
answer = readdata(s, answer) answer = readdata(s, answer)
except: except:
...@@ -202,6 +203,7 @@ def report(): ...@@ -202,6 +203,7 @@ def report():
return f"Error completando datos extra de la patente '{plate}'." return f"Error completando datos extra de la patente '{plate}'."
print(answer) print(answer)
answer['header']["hora"] = str(fingfd)
s.driver.quit() s.driver.quit()
return json.dumps(answer) return json.dumps(answer)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!