Untitled
unknown
plain_text
4 months ago
965 B
8
Indexable
def main(): with open(CSV_FILE, newline="", encoding="utf-8-sig") as f: reader = csv.reader(f, delimiter=";") rows = list(reader) # Nettoyage des noms de colonnes headers = [h.strip() for h in rows[0]] # Correction automatique des noms normalized_headers = [] for h in headers: h = h.replace("\ufeff", "") # supprime BOM h = h.strip() normalized_headers.append(h) print("Colonnes détectées :", normalized_headers) # Reconstruction du DictReader propre data = [] for row in rows[1:]: if not any(row): continue entry = dict(zip(normalized_headers, row)) data.append(entry) # Exécution ALM for row in data: project = row.get("project") level = row.get("level") tag = row.get("tag") if not project or not level or not tag: print("⚠ Ligne ignorée (incomplète) :", row) continue print(f"\n=== Déploiement du projet : {project} ===") code = run_alm_command(project, level, tag) if code == 0: print("✔ Succès") else: print("❌ Échec (code retour :", code, ")")Editor is loading...
Leave a Comment