Fixed issues
This commit is contained in:
@ -73,12 +73,17 @@ def main():
|
||||
exit(1)
|
||||
|
||||
try:
|
||||
exec(f"from remotesyn.toolchains.{toolchain} import do")
|
||||
print(f'Importing toolchain {toolchain}')
|
||||
namespace = {}
|
||||
exec(f"from remotesyn.toolchains.{toolchain} import do", globals(), namespace)
|
||||
do_func = namespace.get('do')
|
||||
if do_func is None:
|
||||
raise ImportError("Failed to import 'do'")
|
||||
except ImportError:
|
||||
log(f"ERROR: Unknown toolchain '{toolchain}'")
|
||||
exit(1)
|
||||
|
||||
ret = do(config, target, log, subprocesses)
|
||||
ret = do_func(config, target, log, subprocesses)
|
||||
|
||||
if ret!=0:
|
||||
log("ERROR: toolchain returned with", ret)
|
||||
|
||||
@ -15,6 +15,7 @@ import threading
|
||||
import socket
|
||||
import shutil
|
||||
import fcntl
|
||||
import traceback
|
||||
|
||||
# List of running threads
|
||||
threads = []
|
||||
@ -209,6 +210,7 @@ class SSHServer(paramiko.ServerInterface):
|
||||
global running
|
||||
if running:
|
||||
print("ERROR: Unknown error:", e)
|
||||
traceback.print_exception(type(e), e, e.__traceback__)
|
||||
return False
|
||||
|
||||
class Connection(threading.Thread):
|
||||
@ -258,6 +260,8 @@ def print_help():
|
||||
print(" -h Show this help message")
|
||||
|
||||
def main():
|
||||
global running
|
||||
|
||||
# Parse arguments
|
||||
i = 1
|
||||
host = ''
|
||||
|
||||
Reference in New Issue
Block a user