diff --git a/kibot/gs.py b/kibot/gs.py index 306ff623..2225360f 100644 --- a/kibot/gs.py +++ b/kibot/gs.py @@ -4,7 +4,12 @@ # License: GPL-3.0 # Project: KiBot (formerly KiPlot) import os -import pcbnew +try: + import pcbnew +except ImportError: + # This is catched by __main__, ignore the error here + class pcbnew(object): + pass from datetime import datetime, date from sys import exit from .misc import EXIT_BAD_ARGS, W_DATEFORMAT, KICAD_VERSION_5_99 @@ -78,6 +83,7 @@ class GS(object): global_output = None global_dir = None global_variant = None + global_units = None solved_global_variant = None global_kiauto_wait_start = None global_kiauto_time_out_scale = None diff --git a/tests/test_plot/test_misc_2.py b/tests/test_plot/test_misc_2.py index 837dca4c..80540cba 100644 --- a/tests/test_plot/test_misc_2.py +++ b/tests/test_plot/test_misc_2.py @@ -204,7 +204,7 @@ def test_bom_no_sch(): # Create an ibom object GS.sch = None out = RegOutput.get_class_for('bom')() - columns = out.options._get_columns() + (columns, extra) = out.options._get_columns() assert columns == ColumnList.COLUMNS_DEFAULT out = RegOutput.get_class_for('kibom')() options = out.options()