Fix Python BOM script bug when output file cannot be opened. (fixes:lp:1391904)
This commit is contained in:
parent
1ebaf1371a
commit
1a550b8ef1
|
@ -26,8 +26,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
|
|||
try:
|
||||
f = open(sys.argv[2], 'w')
|
||||
except IOError:
|
||||
e = "Can't open output file for writing: " + sys.argv[2]
|
||||
print(__file__, ":", e, file=sys.stderr)
|
||||
f = stdout
|
||||
f = sys.stdout
|
||||
|
||||
# subset the components to those wanted in the BOM, controlled
|
||||
# by <configure> block in kicad_netlist_reader.py
|
||||
|
|
Loading…
Reference in New Issue