diff --git a/pygad/pygad.py b/pygad/pygad.py index 9839c05..01dc850 100644 --- a/pygad/pygad.py +++ b/pygad/pygad.py @@ -9,6 +9,7 @@ from pygad import utils from pygad import helper from pygad import visualize +import sys class GA(utils.parent_selection.ParentSelection, utils.crossover.Crossover, @@ -1201,7 +1202,7 @@ def __init__(self, self.last_generation_elitism_indices = None except Exception as e: self.logger.exception(e) - exit(-1) + sys.exit(-1) def round_genes(self, solutions): for gene_idx in range(self.num_genes):