From 7acd287d98b6e6a61f7ee850bee809ba4535581e Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 20 Mar 2015 18:06:19 +0100 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/INITBASE/loader.py b/INITBASE/loader.py index 55cd5e0..f50f1c3 100755 --- a/INITBASE/loader.py +++ b/INITBASE/loader.py @@ -3,7 +3,7 @@ import xml.etree.ElementTree as ET import MySQLdb as mdb import sys import re - +import os def insert (cur, table, dict) : keys = "" @@ -99,9 +99,10 @@ try : elif child.tag == 'image' : image = child.text.encode('utf-8') - + # On s'interesee qu'aux oeuvres ayant une image - if image != "NULL" : + response = os.system("ping -c 1 " + "http://www.augustins.org/documents/10180/156407/"+image) + if image != "NULL" and response == 0 : if str(datation)+str(datation2) in listeDatation : iddatation = listeDatation[str(datation)+str(datation2)] else :