Compare commits

..

2 Commits

2 changed files with 8 additions and 4 deletions

View File

@ -78,15 +78,18 @@ else:
# Initialisation de l'api Airwatch
try:
airwatch = AirwatchAPI(settings)
# Recherche des appareils filtré sur l'utilisateur de staging
devices = airwatch.GetDevices(stagingUser)
logger.info("Airwatch server connection succeeded")
except requests.exceptions.ConnectionError as error:
except FileNotFoundError as F:
logger.critical(f"Certificate file not found for CMSURL authentication : {F}")
os.remove(lockFile)
exit(1)
except Exception as error:
logger.critical(f"Connection to Airwatch server failed : {error}")
os.remove(lockFile)
exit(1)
# Recherche des appareils filtré sur l'utilisateur de staging
devices = airwatch.GetDevices(stagingUser)
if(devices == None):
logger.info(f"No device found with staging user ({stagingUser}), exiting...")
os.remove(lockFile)

View File

@ -88,6 +88,7 @@ logger.info("========= Synchronization started =========")
try:
airwatch = AirwatchAPI(settings)
# recherche des appareils
devices = airwatch.GetDevices()
logger.info("Airwatch server connection succeeded")
except FileNotFoundError as F: