version 1.5, 2010/03/25 12:13:32
|
version 1.6, 2011/02/11 19:08:49
|
Line 57 def handle_line(self, line):
|
Line 57 def handle_line(self, line):
|
|
|
# synchronize by id_field |
# synchronize by id_field |
id_val = self.xml_data[self.xml_id] |
id_val = self.xml_data[self.xml_id] |
|
#logging.debug("id_val=%s xml_id=%s"%(id_val,self.xml_id)) |
|
|
# get img_type |
# get img_type |
img_type_val = self.xml_data[self.xml_img_type] |
img_type_val = self.xml_data[self.xml_img_type] |
Line 116 def parse(self, filename):
|
Line 117 def parse(self, filename):
|
# find all fields |
# find all fields |
if self.dbIDs[id] == 0: |
if self.dbIDs[id] == 0: |
# unmatched entry |
# unmatched entry |
#self.logger.debug("CLEAN: %s with %s"%(self.delQuery,id)) |
self.logger.debug("CLEAN: %s with %s"%(self.delQuery,id)) |
SimpleSearch(self.db, self.delQuery, [id], ascii=self.ascii_db, result=False) |
SimpleSearch(self.db, self.delQuery, [id], ascii=self.ascii_db, result=False) |
|
|
elif self.dbIDs[id] > 0: |
elif self.dbIDs[id] > 0: |
Line 129 def parse(self, filename):
|
Line 130 def parse(self, filename):
|
args = [ imgd.get(f,None) for f in imgTypes ] |
args = [ imgd.get(f,None) for f in imgTypes ] |
args.append(id) |
args.append(id) |
# update |
# update |
#self.logger.debug("UPDATE: %s with %s"%(self.updQuery,args)) |
self.logger.debug("UPDATE: %s with %s"%(self.updQuery,args)) |
SimpleSearch(self.db, self.updQuery, args, ascii=self.ascii_db, result=False) |
SimpleSearch(self.db, self.updQuery, args, ascii=self.ascii_db, result=False) |
|
|
i += 1 |
i += 1 |