From 070989c7b0cde6f5d4fcd5014728e5decca7b935 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 16 Mar 2020 10:24:11 -0300 Subject: [PATCH] Changed the exceptions for check_zone_fills and run_drc to simple errors. --- kiplot/kiplot.py | 7 +++++-- kiplot/misc.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kiplot/kiplot.py b/kiplot/kiplot.py index 24ee8231..cb379dba 100644 --- a/kiplot/kiplot.py +++ b/kiplot/kiplot.py @@ -4,6 +4,7 @@ Main Kiplot code from datetime import datetime import os +import sys import operator from . import plot_config as PCfg @@ -82,10 +83,12 @@ class Plotter(object): logger.debug("Preflight checks") if self.cfg.check_zone_fills: - raise PlotError("Not sure if Python scripts can do zone check!") + logger.error('check_zone_fills not yet supported') + sys.exit(misc.USUPPORTED_OPTION) if self.cfg.run_drc: - raise PlotError("Not sure if Python scripts can run DRC!") + logger.error('run_drc not yet supported') + sys.exit(misc.USUPPORTED_OPTION) def _output_is_layer(self, output): diff --git a/kiplot/misc.py b/kiplot/misc.py index 8f02294f..ccf3195f 100644 --- a/kiplot/misc.py +++ b/kiplot/misc.py @@ -4,3 +4,4 @@ # Error levels NO_YAML_MODULE = 1 NO_PCBNEW_MODULE = 2 +USUPPORTED_OPTION = 3