[telemetry] add an error in case of 404 or other
@@ -80,15 +80,20 @@ for item in env.get("CPPDEFINES", []):
telemetry = False
+if not visited_key in global_env:
if (telemetry == True):
click.secho("\t* Telemetry enabled.", fg="green")
try:
- requests.post("https://monorepo-services.vercel.app/api/telemetry",
+ r = requests.post("https://monorepo-services.vercel.app/api/telemetry",
data=luos_telemetry)
+ if not r:
+ click.secho("\tX Telemetry request failed : error " +
+ str(r.status_code), fg="red")
except:
- click.secho("Telemetry request failed.", fg="red")
+ click.secho("\tX Telemetry request failed.", fg="red")
else:
- click.secho("\t* Telemetry disabled, please consider enabling it by removing the 'NOTELEMETRY' flag to help Luos_engine improve.", fg="red")
+ click.secho(
+ "\t* Telemetry disabled, please consider enabling it by removing the 'NOTELEMETRY' flag to help Luos_engine improve.", fg="red")
click.secho("")
# native unit testing
