From ea08b7fc50611ba9ec2537e3cf20b9dfa4bc942a Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 15 May 2016 23:57:30 +1000 Subject: [PATCH] fix for bom_writer.py --- KiBOM/bom_writer.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/KiBOM/bom_writer.py b/KiBOM/bom_writer.py index a23ae0a5..86548547 100644 --- a/KiBOM/bom_writer.py +++ b/KiBOM/bom_writer.py @@ -35,13 +35,12 @@ 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()