Modification des informations de log pour que l'identification de l'appareil soit présent pour les erreurs

This commit is contained in:
Jason SECULA
2025-07-09 18:36:23 +02:00
parent 074a1e5313
commit 3e19b4d3e6

View File

@ -173,10 +173,10 @@ for device in devices:
deviceID, data, count = glpiapi.GetDevice(device)
apps = airwatch.GetDeviceApps(device)
if(count > 1):
logger.error(f"{count} devices matching airwatch device in GLPI (GLPI ids = {', '.join(deviceID)}), skipping this device...")
logger.error(f"{count} devices matching airwatch device {device.FriendlyName} (id={device.Id}) in GLPI (GLPI ids = {', '.join(deviceID)}), skipping this device...")
continue
if(count == 0):
logger.error(f"Device not found in GLPI, is it in the trash bin ? Skipping device...")
logger.error(f"Device {device.FriendlyName} (id={device.Id}) not found in GLPI, is it in the trash bin ? Skipping device...")
continue
inventory = glpiapi.CreateInventoryForAirwatchDevice(device, data["1"], apps)