Skip to content

Commit 5f76a18

Browse files
committed
Use sys.exit as there is no os.exit
1 parent b9395c4 commit 5f76a18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

intel_extension_for_pytorch/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This Python file uses the following encoding: utf-8
22
import re
33
import os
4+
import sys
45
import torch
56

67

@@ -33,7 +34,7 @@
3334
+ f"{ipex_version}.*, but PyTorch {torch.__version__} is found. "
3435
+ "Please switch to the matching version and run again."
3536
)
36-
os.exit(127)
37+
sys.exit(127)
3738

3839

3940
import os

0 commit comments

Comments
 (0)