Ignore:
Timestamp:
Oct 5, 2017, 1:51:59 PM (22 months ago)
Author:
cameron
Message:

Name_Alias property

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/UCD-scripts/UCD_parser.py

    r5670 r5671  
    315315        else:
    316316            (cp_lo, cp_hi, fields) = parse_data_record(t)
    317             if len(fields) != len(prop_code_list): raise Exception("Mutlicolumn field count mismatch, expecting %i: " % len(prop_code_list) + t)
     317            if len(fields) != len(prop_code_list): raise Exception("Multicolumn field count mismatch, expecting %i: " % len(prop_code_list) + t)
    318318            for i in range(len(fields)):
    319                 if fields[i] != '':
     319                if fields[i] != '' and prop_code_list[i] in property_object_map:
    320320                    property_object_map[prop_code_list[i]].addDataRecord(cp_lo, cp_hi, fields[i])
    321321    for p in prop_code_list:
    322         property_object_map[p].finalizeProperty()
     322        if prop_code_list[i] in property_object_map:
     323            property_object_map[p].finalizeProperty()
    323324
    324325UnicodeData_txt_regexp = re.compile("^([0-9A-F]{4,6});([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);(.*)$")
Note: See TracChangeset for help on using the changeset viewer.