GEP 18: Improve error message

svn: r22619
This commit is contained in:
Benny Malengier 2013-06-27 19:02:11 +00:00
parent ee3350e9d5
commit 9ce8403106

View File

@ -197,9 +197,10 @@ def load_srctemplate_csv(csvfile):
# .replace('[', '').replace(']','').replace('/', '_OR_')\ # .replace('[', '').replace(']','').replace('/', '_OR_')\
# .replace(',', '').replace('.', '').replace(':', '')\ # .replace(',', '').replace('.', '').replace(':', '')\
# .replace('-', '_') # .replace('-', '_')
field_type = int(SrcAttributeType(field_type)) ifield_type = int(SrcAttributeType(field_type))
if field_type == SrcAttributeType.CUSTOM: if ifield_type == SrcAttributeType.CUSTOM:
raise NotImplementedError, "field must be a known SrcAttributeType" raise NotImplementedError, "field must be a known SrcAttributeType, is " + str(SrcAttributeType(field_type))
field_type = ifield_type
#field_descr = field.replace('[', '').replace(']','').lower().capitalize() #field_descr = field.replace('[', '').replace(']','').lower().capitalize()
field_label = row[LABELCOL].strip() field_label = row[LABELCOL].strip()
#field_label = field_label.replace("'", "\\'") #field_label = field_label.replace("'", "\\'")