From b0a37f85e7bb72bf9f4cc7572d5297463f778629 Mon Sep 17 00:00:00 2001 From: Peace Lee Date: Sat, 25 Sep 2021 23:13:35 +0900 Subject: [PATCH] package: Seperate imports of sys package from others (#260) Signed-off-by: Peace Lee --- guider/guider.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/guider/guider.py b/guider/guider.py index bd5f06c1..8d265110 100755 --- a/guider/guider.py +++ b/guider/guider.py @@ -16,12 +16,18 @@ +# import sys package # +try: + import sys +except ImportError: + print("[ERROR] fail to import sys package") + sys.exit(0) + # import essential packages # try: import os import re import gc - import sys import time import errno import signal @@ -31,7 +37,7 @@ #from ctypes import * except ImportError: err = sys.exc_info()[1] - print("[ERROR] fail to import essential packages: %s" % err.args[0]) + print("[ERROR] fail to import essential package: %s" % err.args[0]) sys.exit(0) # convert an unsupported type #