2008-01-18 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/ImportCSV.py (cleanup_column_name): use given, givenname as aliases for firstname; give better warning for missing data on row svn: r9893
This commit is contained in:
parent
07e11bc658
commit
b3d5ad9855
@ -1,3 +1,8 @@
|
||||
2008-01-18 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
||||
* src/plugins/ImportCSV.py (cleanup_column_name):
|
||||
use given, givenname as aliases for firstname;
|
||||
give better warning for missing data on row
|
||||
|
||||
2008-01-18 Erik De Richter <frederik.de.richter@pandora.be>
|
||||
* /po/nl.po: new translations
|
||||
|
||||
|
@ -141,7 +141,7 @@ def rd(line_number, row, col, key, default = None):
|
||||
""" Return Row data by column name """
|
||||
if key in col:
|
||||
if col[key] >= len(row):
|
||||
print "Error: invalid column reference on line", line_number
|
||||
print "Warning: missing '%s' on line %d" % (key, line_number)
|
||||
return default
|
||||
retval = row[col[key]].strip()
|
||||
if retval == "":
|
||||
@ -164,6 +164,8 @@ def cleanup_column_name(column):
|
||||
retval = "husband"
|
||||
elif retval == "parent2":
|
||||
retval = "wife"
|
||||
elif retval in ["given", "givenname"]:
|
||||
retval = "firstname"
|
||||
return retval
|
||||
|
||||
def importData(db, filename, callback=None):
|
||||
|
Loading…
Reference in New Issue
Block a user