KiBot/kibot
Olliver Schinagl 493c74abff 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>
2024-01-02 10:53:27 -03:00
..
EasyEDA [EasyEDA][Fixed] Problems with some step files 2023-12-20 12:27:39 -03:00
PcbDraw
PyPDF2
blender_scripts [Blender Export][Added] Camera option to set the clip start 2023-08-22 09:04:37 -03:00
bom [BoM][Added] `parse_value` can be used to disable the *Value* parser 2023-09-28 11:18:49 -03:00
kicad [Worksheet] Avoid warnings for v20220228 2023-12-18 19:09:19 -03:00
mcpyrate
resources [KiRi][Fixed] Missing icon for not modified commits 2023-12-29 10:49:30 -03:00
svgutils
__init__.py
__main__.py [CLI][Added] Options to list rotation and offset adjusts 2023-11-22 12:47:48 -03:00
banner.py
config_reader.py [CLI][Added] Options to list rotation and offset adjusts 2023-11-22 12:47:48 -03:00
create_pdf.py
dep_downloader.py [Dependencies] Made KiKit point to our fork 2023-09-06 12:51:33 -03:00
docopt.py
drill_marks.py
error.py
fil_base.py [Rotation Filter] Fixes and extensions for JLCPCB 2023-11-14 11:07:12 -03:00
fil_expand_text_vars.py [DOCs][Filters][Added] Descriptive name 2023-08-22 09:36:57 -03:00
fil_field_modify.py [DOCs][Filters][Added] Descriptive name 2023-08-22 09:36:57 -03:00
fil_field_rename.py [DOCs][Filters][Added] Descriptive name 2023-08-22 09:36:57 -03:00
fil_generic.py
fil_rot_footprint.py [CLI][Added] Options to list rotation and offset adjusts 2023-11-22 12:47:48 -03:00
fil_spec_to_field.py [DOCs][Filters][Added] Descriptive name 2023-08-22 09:36:57 -03:00
fil_subparts.py
fil_urlify.py
fil_value_split.py [DOCs][Filters][Added] Descriptive name 2023-08-22 09:36:57 -03:00
fil_var_rename.py [DOCs][Filters][Added] Descriptive name 2023-08-22 09:36:57 -03:00
fil_var_rename_kicost.py [DOCs][Filters][Added] Descriptive name 2023-08-22 09:36:57 -03:00
globals.py Operations that copies the project now also copies the DRU 2023-12-06 08:21:25 -03:00
gs.py Operations that copies the project now also copies the DRU 2023-12-06 08:21:25 -03:00
kiplot.py kiplot: Allow output dir to exist 2024-01-02 10:53:27 -03:00
layer.py [Fixed] Another missing case in the last patch 2023-10-09 10:21:50 -03:00
log.py
macros.py
misc.py [KiRi][Added] Now we can choose the branch 2023-12-29 10:50:21 -03:00
optionable.py [Blender export][Added] Support for pcb2blender 2.7 2023-10-11 13:08:10 -03:00
out_any_drill.py
out_any_layer.py [DOCs][Added] backticks to text replacement variables 2023-11-15 13:39:54 -03:00
out_any_pcb_print.py
out_any_sch_print.py
out_any_stencil.py
out_base.py Now we use the realpath instead of the user provided name 2024-01-02 10:48:06 -03:00
out_base_3d.py [3D models][Download] Catch Easy EDA errors 2023-11-07 09:48:51 -03:00
out_blender_export.py [Blender Export] Removed the "experimental" warning 2023-12-18 18:45:12 -03:00
out_boardview.py
out_bom.py [BoM][Added] `parse_value` can be used to disable the *Value* parser 2023-09-28 11:18:49 -03:00
out_compress.py [Compress][Added] Better subdirs support for outputs 2023-12-29 11:25:17 -03:00
out_copy_files.py [Copy Files][Project][Added] Page layout 2023-12-06 09:21:20 -03:00
out_diff.py [Diff][Fixed] Problems with `current` mode 2023-12-18 10:36:51 -03:00
out_download_datasheets.py [DOCs][Added] backticks to text replacement variables 2023-11-15 13:39:54 -03:00
out_dxf.py [DOCs][DXF] Made the docstring indentation coherent 2023-08-29 07:50:37 -03:00
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 [BoM][Added] LCSC links 2023-09-01 13:51:15 -03:00
out_kicost.py
out_kikit_present.py
out_kiri.py [KiRi] Implemented the quick-start example 2024-01-02 09:56:54 -03:00
out_navigate_results.py
out_netlist.py
out_panelize.py [DOCs][Fixed] Typo in panelization output 2023-11-15 13:41:22 -03:00
out_pcb2blender_tools.py [Fixed] Removed debug print 2023-10-18 12:48:25 -03:00
out_pcb_print.py [Added] Warning about KiCad Bug #16418 2023-12-21 13:04:51 -03:00
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 [Position][Removed] exclude_strange_footprints option 2023-11-16 08:49:58 -03:00
out_ps.py
out_ps_sch_print.py
out_qr_lib.py [QR Lib][Fixed] Bottom QRs should be mirrored in the Y axis 2023-12-06 07:52:36 -03:00
out_render_3d.py
out_report.py Cosmetic comment change 2023-11-16 11:16:16 -03:00
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 [DOCs][Added] drc_exclusions_workaround mention in DRC help 2023-12-04 07:34:09 -03:00
pre_run_erc.py [ERC][KiCad 7][Fixed] Problems when creating a report without ext 2023-12-14 08:06:31 -03:00
pre_sch_replace.py
pre_set_text_variables.py [DOCs][Added] backticks to text replacement variables 2023-11-15 13:39:54 -03:00
pre_update_qr.py
pre_update_xml.py [Update XML][Fixed] Error when using "Exclude from BoM" (KiCad 6) 2023-08-30 09:22:01 -03:00
registrable.py
var_base.py [Sub PCBs][Fixed] Using annotation method 2023-10-02 10:05:33 -03:00
var_ibom.py
var_kibom.py
var_kicost.py