version 1.1.2.9, 2011/05/18 10:52:29
|
version 1.1.2.11, 2012/01/09 07:33:31
|
Line 1
|
Line 1
|
try: |
|
import psycopg2 as psycopg |
import psycopg2 as psycopg |
psyco = 2 |
psyco = 2 |
except: |
|
import psycopg |
|
psyco = 1 |
|
|
|
import logging |
import logging |
from MPIWGHelper import unicodify, utf8ify |
from MPIWGHelper import unicodify, utf8ify |
Line 16 fm_ns = 'http://www.filemaker.com/fmpxml
|
Line 12 fm_ns = 'http://www.filemaker.com/fmpxml
|
|
|
# list of fields that are taken from XML and checked against DB as conflicts |
# list of fields that are taken from XML and checked against DB as conflicts |
#checkFields=['key','first_name','last_name','title','home_inst','current_work','e_mail2'] |
#checkFields=['key','first_name','last_name','title','home_inst','current_work','e_mail2'] |
checkFields=['key','first_name','last_name','title','titles_new','home_inst','current_work','e_mail2'] |
checkFields=['key','first_name','last_name','title','titles_new','home_inst','current_work'] |
|
|
|
|
def sql_quote(v): |
def sql_quote(v): |
# quote dictionary |
# quote dictionary |
Line 288 def checkForConflicts(cursor,dataSet,key
|
Line 285 def checkForConflicts(cursor,dataSet,key
|
for checkField in checkFields: |
for checkField in checkFields: |
dbValueR=sr[0][i] |
dbValueR=sr[0][i] |
if dbValueR: |
if dbValueR: |
dbValue=dbValueR.decode('utf-8') |
dbValue=unicodify(dbValueR) |
else: |
else: |
dbValue="" |
dbValue="" |
|
|