Skip to content

Commit f1aa930

Browse files
committed
Use exist() from sys lib
1 parent ace7e65 commit f1aa930

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pygad/pygad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from pygad import utils
1010
from pygad import helper
1111
from pygad import visualize
12+
import sys
1213

1314
class GA(utils.parent_selection.ParentSelection,
1415
utils.crossover.Crossover,
@@ -1201,7 +1202,7 @@ def __init__(self,
12011202
self.last_generation_elitism_indices = None
12021203
except Exception as e:
12031204
self.logger.exception(e)
1204-
exit(-1)
1205+
sys.exit(-1)
12051206

12061207
def round_genes(self, solutions):
12071208
for gene_idx in range(self.num_genes):

0 commit comments

Comments
 (0)