From 7cd3d53252181d1837b6a17961c420a4511b2326 Mon Sep 17 00:00:00 2001 From: ju5t Date: Mon, 25 Jun 2018 09:43:23 +0200 Subject: Skip subdirectories during import If a directory contains subdirectories from_directory throws an exception. --- gerber/pcb.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gerber') diff --git a/gerber/pcb.py b/gerber/pcb.py index a213fb3..ba15161 100644 --- a/gerber/pcb.py +++ b/gerber/pcb.py @@ -48,6 +48,9 @@ class PCB(object): except ParseError: if verbose: print('[PCB]: Skipping file {}'.format(filename)) + except IOError: + if verbose: + print('[PCB]: Skipping file {}'.format(filename)) # Try to guess board name if board_name is None: -- cgit