Skip to content

Commit 0f9a3c1

Browse files
authored
Merge pull request #193 from ahmedfgad/github-actions
Use exit() from sys library
2 parents 4e834a8 + f1aa930 commit 0f9a3c1

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)