Browse Source

Fix: corrections diverses

olivier.massot 7 years ago
parent
commit
87e0afe1e8
3 changed files with 4 additions and 5 deletions
  1. 1 1
      qgis_sync_video.py
  2. 1 2
      qgis_sync_wincan.py
  3. 2 2
      wincan2ctrl.py

+ 1 - 1
qgis_sync_video.py

@@ -131,7 +131,7 @@ def main():
 
     if not chantiers:
         logger.info("Aucun nouveaux chantiers")
-        sys.exit(0)
+        return
 
     logger.info("{} chantiers chargés en mémoire".format(len(chantiers)))
 

+ 1 - 2
qgis_sync_wincan.py

@@ -56,8 +56,7 @@ def main():
 
     if not a_importer:
         logger.info("Aucun nouveau dossier à importer")
-        sys.exit()
-
+        return
 
     for chantier_dir in a_importer:
         # Ici, les noms de chantier sont de la forme 000000, 000000-0, ou 000000-S0

+ 2 - 2
wincan2ctrl.py

@@ -109,7 +109,7 @@ def main():
             chantier_id = input("Veuillez saisir le code chantier: ")
             if not chantier_id:
                 logger.error("Code chantier invalide")
-                sys.exit(1)
+                return
 
     # Calcul du numéro d'intervention
     last_interv_id = controles_db.first("SELECT max(bytIntervId) as last_interv_id FROM tblVideoIntervs WHERE lngChantierId={}".format(chantier_id)).last_interv_id
@@ -129,7 +129,7 @@ def main():
         if not input("Voulez-vous continuer? (o/n)") == 'o':
             if input("Etes-vous sûr de vouloir annuler l'opération? (o/n)") == 'o':
                 logger.info("Opération annulée par l'utilisateur")
-                sys.exit(1)
+                return
 
 
     # Recuperation des données de l'intervention