Commit 1a550b8e authored by TomCC's avatar TomCC Committed by Wayne Stambaugh

Fix Python BOM script bug when output file cannot be opened. (fixes:lp:1391904)

parent 1ebaf137
...@@ -26,8 +26,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1]) ...@@ -26,8 +26,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
try: try:
f = open(sys.argv[2], 'w') f = open(sys.argv[2], 'w')
except IOError: except IOError:
e = "Can't open output file for writing: " + sys.argv[2]
print(__file__, ":", e, file=sys.stderr) print(__file__, ":", e, file=sys.stderr)
f = stdout f = sys.stdout
# subset the components to those wanted in the BOM, controlled # subset the components to those wanted in the BOM, controlled
# by <configure> block in kicad_netlist_reader.py # by <configure> block in kicad_netlist_reader.py
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment