Merge branch 'master' of https://github.com/matthieupenchenat81/ModuleWeb
This commit is contained in:
commit
49191494ac
@ -4,7 +4,7 @@ import MySQLdb as mdb
|
|||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
import httplib
|
import httplib
|
||||||
import sys
|
|
||||||
|
|
||||||
def exists(site, path):
|
def exists(site, path):
|
||||||
c = httplib.HTTPConnection(site)
|
c = httplib.HTTPConnection(site)
|
||||||
@ -48,10 +48,10 @@ try :
|
|||||||
# On parcourt le fichier xml
|
# On parcourt le fichier xml
|
||||||
tree = ET.parse('inventaire.xml')
|
tree = ET.parse('inventaire.xml')
|
||||||
root = tree.getroot()
|
root = tree.getroot()
|
||||||
|
i=0
|
||||||
# Pour chaque oeuvre
|
# Pour chaque oeuvre
|
||||||
for o in root.iter('oeuvre'):
|
for o in root.iter('oeuvre'):
|
||||||
sys.stdout.write('.')
|
print(i)
|
||||||
idtechnique = "NULL"
|
idtechnique = "NULL"
|
||||||
idmatiere = "NULL"
|
idmatiere = "NULL"
|
||||||
iddomaine= "NULL"
|
iddomaine= "NULL"
|
||||||
@ -198,6 +198,7 @@ try :
|
|||||||
del datas[key]
|
del datas[key]
|
||||||
|
|
||||||
idoeuvre = insert(cur,"oeuvres",datas)
|
idoeuvre = insert(cur,"oeuvres",datas)
|
||||||
|
i+=1
|
||||||
con.commit()
|
con.commit()
|
||||||
|
|
||||||
except mdb.Error, e:
|
except mdb.Error, e:
|
||||||
|
Reference in New Issue
Block a user