From db8acd12586ac9f68548b0a0fb80ae0d9fe55417 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 15 Jan 2024 11:17:39 -0300 Subject: [PATCH] [Quick Start][Fixed] Problems scanning dirs without enough privileges --- CHANGELOG.md | 6 ++++-- kibot/kiplot.py | 13 ++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0399f63b..e61315c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -107,7 +107,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Note that JLCPCB BoM and Position files aren't included anymore, they are uploaded separately. - Quick Start: - - Now we generate if for projects, not separated files. + - Now we generate only for projects, not separated files. This avoids problems for sub-sheets in separated dirs. - Diff: - When *check_zone_fills* is enabled now we do a refill for the boards @@ -151,7 +151,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - PCB Print: - Issues when forcing the board edge and using scaling (#532) - Text not searchable when using newer rsvg-convert tools (#552) - +- Quick Start: + - Problems with KiCad 6+ files using KiCad 5 names for layers + - Problems scanning dirs without enough privileges ## [1.6.3] - 2023-06-26 ### Added diff --git a/kibot/kiplot.py b/kibot/kiplot.py index e1e13f63..3b50012a 100644 --- a/kibot/kiplot.py +++ b/kibot/kiplot.py @@ -1041,11 +1041,14 @@ def generate_targets(config_file): def _walk(path, depth): """ Recursively list files and directories up to a certain depth """ depth -= 1 - with os.scandir(path) as p: - for entry in p: - yield entry.path - if entry.is_dir() and depth > 0: - yield from _walk(entry.path, depth) + try: + with os.scandir(path) as p: + for entry in p: + yield entry.path + if entry.is_dir() and depth > 0: + yield from _walk(entry.path, depth) + except Exception as e: + logger.debug(f'Skipping {path} because {e}') def setup_fonts(source):