--- ZSQLExtend/importFMPXML.py 2008/10/06 16:02:31 1.28 +++ ZSQLExtend/importFMPXML.py 2009/02/10 17:54:00 1.29 @@ -22,7 +22,7 @@ except: fm_ns = 'http://www.filemaker.com/fmpxmlresult' -version_string = "V0.6.2 ROC 6.10.2008" +version_string = "V0.6.3 ROC 10.2.2009" def unicodify(text, withNone=False): """decode str (utf-8 or latin-1 representation) into unicode object""" @@ -438,9 +438,17 @@ class xml_handler: # synchronize by id_field if self.id_field: if self.id_type == 'integer': - id_val = int(self.xml_data[self.xml_id]) + try: + id_val = int(self.xml_data[self.xml_id]) + except: + pass else: id_val = self.xml_data[self.xml_id] + + if not id_val: + # abort update + self.logger.error("ERROR: unable to sync! emtpy id in row %s"%self.rowcnt) + return if id_val in self.dbIDs: self.dbIDs[id_val] += 1