fix for bom_writer.py

This commit is contained in:
Oliver 2016-05-15 23:57:30 +10:00
parent d8ff6a9d2b
commit ea08b7fc50
1 changed files with 3 additions and 4 deletions

View File

@ -35,14 +35,13 @@ def WriteBoM(filename, groups, net, headings = columns.ColumnList._COLUMNS_DEFAU
#remove any headings that appear in the ignore[] list
headings = [h for h in headings if not h.lower() in [i.lower() for i in prefs.ignore]]
#make a temporary copy of the output file
TmpFileCopy(filename)
#if no extension is given, assume .csv (and append!)
if len(filename.split('.')) < 2:
filename += ".csv"
#make a temporary copy of the output file
TmpFileCopy(filename)
ext = filename.split('.')[-1].lower()
result = False