File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1169,14 +1169,20 @@ def run(self, output_dir):
11691169 self .load_list_components ()
11701170 variant = self .variant or GS .solved_global_variant
11711171 if variant :
1172- GS .pro_variables ['VARIANT' ] = variant .name
1173- GS .pro_variables ['VARIANT_DESC' ] = variant .comment
1172+ if GS .pro_variables :
1173+ GS .pro_variables ['VARIANT' ] = variant .name
1174+ GS .pro_variables ['VARIANT_DESC' ] = variant .comment
1175+ else :
1176+ logger .debug ("Not setting VARIANT*" )
11741177 if GS .ki10 and variant .type == 'kicad' and GS .board :
11751178 logger .debug (f"Switching the PCB to { variant .name } " )
11761179 GS .board .SetCurrentVariant (variant .name )
11771180 else :
11781181 # KiCad 10 behavior when "Default" variant is selected
1179- GS .pro_variables ['VARIANT' ] = GS .pro_variables ['VARIANT_DESC' ] = ""
1182+ if GS .pro_variables :
1183+ GS .pro_variables ['VARIANT' ] = GS .pro_variables ['VARIANT_DESC' ] = ""
1184+ else :
1185+ logger .debug ("Not setting VARIANT*" )
11801186 if GS .ki10 and GS .board :
11811187 logger .debug ("Switching the PCB to 'Default' variant" )
11821188 GS .board .SetCurrentVariant ('' )
You can’t perform that action at this time.
0 commit comments