From 63b45855209ed600d1a13aee352fdbaaddb83316 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 3 Apr 2015 16:19:09 +0200 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9=C2=A0:=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20INITBASE/loader.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- INITBASE/loader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/INITBASE/loader.py b/INITBASE/loader.py index 304d387..7a66c05 100755 --- a/INITBASE/loader.py +++ b/INITBASE/loader.py @@ -5,6 +5,10 @@ import sys import re import httplib +if len(sys.argv) < 3: + print("Usage : python loader.py ") + sys.exit(1) + def exists(site, path): c = httplib.HTTPConnection(site) @@ -35,7 +39,7 @@ try : listeAuteur = {} listeDatation = {} - con = mdb.connect('127.0.0.1', 'root', 'l3miashs2015', 'moduleweb',charset='utf8') + con = mdb.connect(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4],charset='utf8') cur = con.cursor() # Suppresion des données existantes dan la bd cur.execute("TRUNCATE table auteurs")