Skip to content

Commit 2540f01

Browse files
pi-anlandrewleech
authored andcommitted
Handle situation when options.source_dir is None
1 parent bf08b10 commit 2540f01

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/options.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ def mcu_is_enabled(parser, mcu):
130130

131131
def extract_mcus(parser, options):
132132
try:
133-
for source_dir in options.source_dir:
134-
Target.add_extra_targets(source_dir)
135-
update_target_data()
133+
if options.source_dir:
134+
for source_dir in options.source_dir:
135+
Target.add_extra_targets(source_dir)
136+
update_target_data()
136137
except KeyError:
137138
pass
138139
targetnames = TARGET_NAMES

0 commit comments

Comments
 (0)