Compare commits
2 Commits
914abf5018
...
68a0d7d6ab
| Author | SHA1 | Date | |
|---|---|---|---|
| 68a0d7d6ab | |||
| ecbd48cbc0 |
@ -78,15 +78,18 @@ else:
|
|||||||
# Initialisation de l'api Airwatch
|
# Initialisation de l'api Airwatch
|
||||||
try:
|
try:
|
||||||
airwatch = AirwatchAPI(settings)
|
airwatch = AirwatchAPI(settings)
|
||||||
|
# Recherche des appareils filtré sur l'utilisateur de staging
|
||||||
|
devices = airwatch.GetDevices(stagingUser)
|
||||||
logger.info("Airwatch server connection succeeded")
|
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}")
|
logger.critical(f"Connection to Airwatch server failed : {error}")
|
||||||
os.remove(lockFile)
|
os.remove(lockFile)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# Recherche des appareils filtré sur l'utilisateur de staging
|
|
||||||
devices = airwatch.GetDevices(stagingUser)
|
|
||||||
|
|
||||||
if(devices == None):
|
if(devices == None):
|
||||||
logger.info(f"No device found with staging user ({stagingUser}), exiting...")
|
logger.info(f"No device found with staging user ({stagingUser}), exiting...")
|
||||||
os.remove(lockFile)
|
os.remove(lockFile)
|
||||||
|
|||||||
@ -88,6 +88,7 @@ logger.info("========= Synchronization started =========")
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
airwatch = AirwatchAPI(settings)
|
airwatch = AirwatchAPI(settings)
|
||||||
|
# recherche des appareils
|
||||||
devices = airwatch.GetDevices()
|
devices = airwatch.GetDevices()
|
||||||
logger.info("Airwatch server connection succeeded")
|
logger.info("Airwatch server connection succeeded")
|
||||||
except FileNotFoundError as F:
|
except FileNotFoundError as F:
|
||||||
|
|||||||
Reference in New Issue
Block a user