Modification des informations de log pour que l'identification de l'appareil soit présent pour les erreurs
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user