修复当导入模块依赖不满足循环报错的问题
This commit is contained in:
parent
8cfdb19a08
commit
78b6fc390d
@ -64,10 +64,10 @@ except ImportError as ex:
|
||||
os.environ['LD_LIBRARY_PATH'] = clib_path
|
||||
else:
|
||||
os.environ['LD_LIBRARY_PATH'] = clib_path + ":" + ld_path
|
||||
try:
|
||||
os.execl(sys.executable, sys.executable, *sys.argv)
|
||||
except Exception as ex:
|
||||
sys.exit("Failed to set the enviroment variable: %s" % str(ex))
|
||||
try:
|
||||
os.execl(sys.executable, sys.executable, *sys.argv)
|
||||
except Exception as ex:
|
||||
sys.exit("Failed to set the enviroment variable: %s" % str(ex))
|
||||
import paramiko
|
||||
except ImportError as ex:
|
||||
raise Exception(ErrorCode.GAUSS_522["GAUSS_52200"] % str(ex))
|
||||
|
@ -41,7 +41,6 @@ from gspylib.common.Constants import Constants
|
||||
try:
|
||||
import paramiko
|
||||
except ImportError as ex:
|
||||
print(ex)
|
||||
try:
|
||||
local_path = os.path.dirname(os.path.realpath(__file__))
|
||||
clib_path = os.path.realpath(os.path.join(local_path, "../../gspylib/clib/"))
|
||||
@ -51,10 +50,10 @@ except ImportError as ex:
|
||||
os.environ['LD_LIBRARY_PATH'] = clib_path
|
||||
else:
|
||||
os.environ['LD_LIBRARY_PATH'] = clib_path + ":" + ld_path
|
||||
try:
|
||||
os.execl(sys.executable, sys.executable, *sys.argv)
|
||||
except Exception as ex:
|
||||
sys.exit("Failed to set the enviroment variable: %s" % str(ex))
|
||||
try:
|
||||
os.execl(sys.executable, sys.executable, *sys.argv)
|
||||
except Exception as ex:
|
||||
sys.exit("Failed to set the enviroment variable: %s" % str(ex))
|
||||
import paramiko
|
||||
except ImportError as ex:
|
||||
raise Exception(ErrorCode.GAUSS_522["GAUSS_52200"] % str(ex))
|
||||
|
Loading…
x
Reference in New Issue
Block a user