Skip to content

Commit 9b44dfe

Browse files
committed
Correct import for error handling
The exit utility is in sys standard library. Signed-off-by: Weida Hong <[email protected]>
1 parent ac39462 commit 9b44dfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intel_extension_for_pytorch/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Python file uses the following encoding: utf-8
22
import re
3-
import os
3+
import sys
44
import torch
55

66

@@ -33,7 +33,7 @@
3333
+ f"{ipex_version}.*, but PyTorch {torch.__version__} is found. "
3434
+ "Please switch to the matching version and run again."
3535
)
36-
os.exit(127)
36+
sys.exit(127)
3737

3838

3939
import os

0 commit comments

Comments
 (0)