KiBot/kibot
Olliver Schinagl aa11e95b0b
kiplot: Allow output dir to exist
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>
2023-12-25 12:33:08 +01:00
..
EasyEDA
PcbDraw
PyPDF2
blender_scripts
bom [Electro-grammar][Fixed] Problems with floating point tolerances 2023-05-29 10:09:05 -03:00
kicad Unit name handler added for v6_sch module. 2023-11-05 12:50:21 +10:00
mcpyrate
resources [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
svgutils
__init__.py
__main__.py [Fixed] Read gziped config files as text files 2023-05-24 12:39:57 -03:00
banner.py
config_reader.py Added the name of the faulty YAML when we get an error 2023-06-14 13:21:42 -03:00
create_pdf.py
dep_downloader.py
docopt.py
drill_marks.py
error.py Added stack trace to various exit cases 2023-05-16 10:56:13 -03:00
fil_base.py [Filters][Added] `value_split` 2023-05-03 14:09:35 -03:00
fil_expand_text_vars.py
fil_field_modify.py [Filters] More debug in field modify 2023-04-28 10:39:51 -03:00
fil_field_rename.py
fil_generic.py [Filters][Added] New `generic` filter options 2023-05-05 06:37:34 -03:00
fil_rot_footprint.py
fil_spec_to_field.py [Filters][Spec_to_Field][Added] Dist coherence and dist desc 2023-05-10 11:25:56 -03:00
fil_subparts.py
fil_urlify.py
fil_value_split.py [DOCs] Added link to the value_split example 2023-05-04 11:04:52 -03:00
fil_var_rename.py
fil_var_rename_kicost.py
globals.py [Diff] Changed repo protection to worktree mechanism 2023-06-06 12:53:19 -03:00
gs.py [Diff] Changed repo protection to worktree mechanism 2023-06-06 12:53:19 -03:00
kiplot.py kiplot: Allow output dir to exist 2023-12-25 12:33:08 +01:00
layer.py [Compress][Gerber][Fixed] Problems with inner layers 2023-05-29 09:52:04 -03:00
log.py [KiCost] Indented messages from it 2023-05-05 11:22:41 -03:00
macros.py
misc.py [Groups][Added] outputs can request to be added to one or more groups 2023-05-18 09:07:17 -03:00
optionable.py
out_any_drill.py
out_any_layer.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_any_pcb_print.py
out_any_sch_print.py [Diff][Schematic][Fixed] Project not copied to variant 2023-05-16 13:28:51 -03:00
out_any_stencil.py
out_base.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_base_3d.py
out_blender_export.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_boardview.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_bom.py aggregated csv export error fix 2023-07-25 16:36:31 +02:00
out_compress.py [Compress] Added `skip_not_run` 2023-06-14 09:01:27 -03:00
out_copy_files.py [Fixed][Copy files] 3D models copy issues 2023-05-22 12:50:41 -03:00
out_diff.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_download_datasheets.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_dxf.py
out_dxf_sch_print.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_excellon.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_gencad.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_gerb_drill.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_gerber.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_hpgl.py
out_hpgl_sch_print.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_ibom.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_info.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_kibom.py
out_kicost.py
out_kikit_present.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_navigate_results.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_netlist.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_panelize.py Add dimensions config to kikit panelize post: 2023-08-25 01:43:27 -07:00
out_pcb2blender_tools.py
out_pcb_print.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_pcb_variant.py
out_pcbdraw.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_pdf.py
out_pdf_pcb_print.py
out_pdf_sch_print.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_pdfunite.py
out_populate.py [Filters][Added] `spec_to_field` 2023-05-05 11:25:34 -03:00
out_position.py [Position][Added] quote_all option 2023-06-26 09:33:08 -03:00
out_ps.py
out_ps_sch_print.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_qr_lib.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_render_3d.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_report.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_sch_variant.py
out_stencil_3d.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_stencil_for_jig.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_step.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_svg.py
out_svg_pcb_print.py
out_svg_sch_print.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
out_vrml.py [Quick-Start] No longer use dedicated templates 2023-06-14 13:24:08 -03:00
pre_annotate_pcb.py
pre_annotate_power.py
pre_any_replace.py
pre_base.py [CLI][Added] More clear --list output and --only-pre option 2023-05-17 12:43:41 -03:00
pre_check_zone_fills.py [Templates][Added] CheckZoneFill aborts on big changes 2023-05-18 11:28:06 -03:00
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 [PCB][Added] Invalidate the text variables cache 2023-05-18 10:47:23 -03:00
pre_update_qr.py
pre_update_xml.py
registrable.py [Groups][Added] outputs can request to be added to one or more groups 2023-05-18 09:07:17 -03:00
var_base.py
var_ibom.py
var_kibom.py
var_kicost.py