Skip to content

Commit

Permalink
Update Idf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Barleyman authored and wwmayer committed Mar 29, 2014
1 parent 69044c6 commit e1b5f91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Idf/Idf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def process_emn(doc,filename):
section_counter=0
for emnline in emnlines:
emnrecords=split_records(emnline)
if emnrecords[0][0:4]==".END":
+ if len( emnrecords )==0 : continue
+ if len( emnrecords[0] )>4 and emnrecords[0][0:4]==".END":
passed_sections.append(current_section)
current_section=""
elif emnrecords[0][0]==".":
Expand Down Expand Up @@ -241,7 +242,8 @@ def process_emp(doc,filename,placement,board_thickness):
comps=[]
for empline in emplines:
emprecords=split_records(empline)
if emprecords[0][0:4]==".END":
+ if len( emnrecords )==0 : continue
+ if len( emnrecords[0] )>4 and emnrecords[0][0:4]==".END":
current_section=""
passed_sections.append(current_section)
if comp_PartNumber!="":
Expand Down

0 comments on commit e1b5f91

Please sign in to comment.