Skip to content

Commit

Permalink
sys.exit instead of exit
Browse files Browse the repository at this point in the history
  • Loading branch information
pde-bakk committed Oct 19, 2022
1 parent 5e29b6f commit 717e892
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module01/ex04/linear_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

import numpy as np
import pandas as pd
from my_linear_regression import MyLinearRegression as MyLR
Expand Down Expand Up @@ -44,7 +46,7 @@ def main() -> None:
data = pd.read_csv('../resources/are_blue_pills_magic.csv')
except (FileNotFoundError, pd.errors.EmptyDataError) as e:
print('Error. Please supply a valid path to the csv file')
exit(1)
sys.exit(1)
Xpill = np.array(data['Micrograms']).reshape(-1, 1)
Yscore = np.array(data['Score']).reshape(-1, 1)
linear_model1 = MyLR(np.array([[89.0], [-8]]))
Expand Down

0 comments on commit 717e892

Please sign in to comment.