When running kibot with `--out-dir /my_path/reports`, contrary to other
means of running kibot, we check if a path exists. However, this seems
to fail with for example symlinks, resulting in the following error.
Using SCH file: 1.kicad_sch
- 'Records information about the current run.' (info) [info]
Traceback (most recent call last):
File "/usr/bin/kibot", line 33, in <module>
sys.exit(load_entry_point('kibot==1.6.3', 'console_scripts', 'kibot')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/kibot/__main__.py", line 520, in main
generate_outputs(outputs, args.target, args.invert_sel, args.skip_pre, args.cli_order, args.no_priority,
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 527, in generate_outputs
_generate_outputs(outputs, targets, invert, skip_pre, cli_order, no_priority, dont_stop)
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 517, in _generate_outputs
run_output(out, dont_stop)
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 418, in run_output
out.run(get_output_dir(out.dir, out))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 366, in get_output_dir
os.makedirs(outdir)
File "<frozen os>", line 225, in makedirs
FileExistsError: [Errno 17] File exists: '/my_path/reports'
Instead of manually determining things, lets just use os.makedirs to
handle this with the `exists_ok` argument, as we do elsewhere.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
|
||
|---|---|---|
| .. | ||
| EasyEDA | ||
| PcbDraw | ||
| PyPDF2 | ||
| blender_scripts | ||
| bom | ||
| kicad | ||
| mcpyrate | ||
| resources | ||
| svgutils | ||
| __init__.py | ||
| __main__.py | ||
| banner.py | ||
| config_reader.py | ||
| create_pdf.py | ||
| dep_downloader.py | ||
| docopt.py | ||
| drill_marks.py | ||
| error.py | ||
| fil_base.py | ||
| fil_expand_text_vars.py | ||
| fil_field_modify.py | ||
| fil_field_rename.py | ||
| fil_generic.py | ||
| fil_rot_footprint.py | ||
| fil_spec_to_field.py | ||
| fil_subparts.py | ||
| fil_urlify.py | ||
| fil_value_split.py | ||
| fil_var_rename.py | ||
| fil_var_rename_kicost.py | ||
| globals.py | ||
| gs.py | ||
| kiplot.py | ||
| layer.py | ||
| log.py | ||
| macros.py | ||
| misc.py | ||
| optionable.py | ||
| out_any_drill.py | ||
| out_any_layer.py | ||
| out_any_pcb_print.py | ||
| out_any_sch_print.py | ||
| out_any_stencil.py | ||
| out_base.py | ||
| out_base_3d.py | ||
| out_blender_export.py | ||
| out_boardview.py | ||
| out_bom.py | ||
| out_compress.py | ||
| out_copy_files.py | ||
| out_diff.py | ||
| out_download_datasheets.py | ||
| out_dxf.py | ||
| out_dxf_sch_print.py | ||
| out_excellon.py | ||
| out_gencad.py | ||
| out_gerb_drill.py | ||
| out_gerber.py | ||
| out_hpgl.py | ||
| out_hpgl_sch_print.py | ||
| out_ibom.py | ||
| out_info.py | ||
| out_kibom.py | ||
| out_kicost.py | ||
| out_kikit_present.py | ||
| out_kiri.py | ||
| out_navigate_results.py | ||
| out_netlist.py | ||
| out_panelize.py | ||
| out_pcb2blender_tools.py | ||
| out_pcb_print.py | ||
| out_pcb_variant.py | ||
| out_pcbdraw.py | ||
| out_pdf.py | ||
| out_pdf_pcb_print.py | ||
| out_pdf_sch_print.py | ||
| out_pdfunite.py | ||
| out_populate.py | ||
| out_position.py | ||
| out_ps.py | ||
| out_ps_sch_print.py | ||
| out_qr_lib.py | ||
| out_render_3d.py | ||
| out_report.py | ||
| out_sch_variant.py | ||
| out_stencil_3d.py | ||
| out_stencil_for_jig.py | ||
| out_step.py | ||
| out_svg.py | ||
| out_svg_pcb_print.py | ||
| out_svg_sch_print.py | ||
| out_vrml.py | ||
| pre_annotate_pcb.py | ||
| pre_annotate_power.py | ||
| pre_any_replace.py | ||
| pre_base.py | ||
| pre_check_zone_fills.py | ||
| pre_erc_warnings.py | ||
| pre_fill_zones.py | ||
| pre_filters.py | ||
| pre_ignore_unconnected.py | ||
| pre_pcb_replace.py | ||
| pre_run_drc.py | ||
| pre_run_erc.py | ||
| pre_sch_replace.py | ||
| pre_set_text_variables.py | ||
| pre_update_qr.py | ||
| pre_update_xml.py | ||
| registrable.py | ||
| var_base.py | ||
| var_ibom.py | ||
| var_kibom.py | ||
| var_kicost.py | ||