Fix imports
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
@@ -3,13 +3,14 @@
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
import os
|
||||
import re
|
||||
import paramiko
|
||||
import socket
|
||||
import subprocess
|
||||
from datetime import timedelta, datetime
|
||||
|
||||
import paramiko
|
||||
from datetime import timedelta, datetime
|
||||
|
||||
from connection.base_executor import BaseExecutor
|
||||
from core.test_run import TestRun, Blocked
|
||||
@@ -46,7 +47,7 @@ class SshExecutor(BaseExecutor):
|
||||
hostname = target["hostname"]
|
||||
key_filename = target.get("identityfile", None)
|
||||
user = target.get("user", user)
|
||||
port = target.get("port", port)
|
||||
port = int(target.get("port", port))
|
||||
if target.get("proxyjump", None) is not None:
|
||||
proxy = config.lookup(target["proxyjump"])
|
||||
jump = paramiko.SSHClient()
|
||||
|
@@ -0,0 +1,4 @@
|
||||
#
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@@ -1,9 +1,10 @@
|
||||
#
|
||||
# Copyright(c) 2020-2021 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
import concurrent
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
|
||||
def start_async_func(func, *args):
|
||||
@@ -14,5 +15,5 @@ def start_async_func(func, *args):
|
||||
- done() method returns True when task ended (have a result or ended with an exception)
|
||||
otherwise returns False
|
||||
"""
|
||||
executor = concurrent.futures.ThreadPoolExecutor()
|
||||
executor = ThreadPoolExecutor()
|
||||
return executor.submit(func, *args)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright(c) 2019-2021 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright(c) 2021 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@@ -33,7 +34,7 @@ class Retry:
|
||||
try:
|
||||
result = func()
|
||||
return True
|
||||
except:
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
cls.run_while_false(wrapped_func, retries=retries, timeout=timeout)
|
||||
|
Reference in New Issue
Block a user