mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
devlib: Remove "future"
Remove the "future" dependency as devlib does not support Python 2 anymore. Also remove the "from __future__ import division" as this is the default in Python 3.
This commit is contained in:
parent
111aa327ce
commit
93ada9762d
@ -13,7 +13,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
import re
|
||||
from itertools import takewhile
|
||||
from datetime import timedelta
|
||||
|
@ -13,7 +13,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
|
@ -12,7 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
from __future__ import division
|
||||
from collections import defaultdict
|
||||
|
||||
from devlib.derived import DerivedMeasurements, DerivedMetric
|
||||
|
@ -13,7 +13,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
import os
|
||||
|
||||
try:
|
||||
|
@ -12,7 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
from __future__ import division
|
||||
import logging
|
||||
import collections
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
#
|
||||
|
||||
#pylint: disable=attribute-defined-outside-init
|
||||
from __future__ import division
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
|
||||
# pylint: disable=W0613,E1101,access-member-before-definition,attribute-defined-outside-init
|
||||
from __future__ import division
|
||||
import os
|
||||
import shutil
|
||||
import signal
|
||||
|
@ -12,7 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
from __future__ import division
|
||||
import os
|
||||
import signal
|
||||
import tempfile
|
||||
|
@ -13,7 +13,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
import os
|
||||
|
||||
from devlib.instrument import (Instrument, CONTINUOUS,
|
||||
|
@ -12,8 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import division
|
||||
|
||||
from devlib.platform.gem5 import Gem5SimulationPlatform
|
||||
from devlib.instrument import Instrument, CONTINUOUS, MeasurementsCsv
|
||||
from devlib.exception import TargetStableError
|
||||
|
@ -12,7 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
from __future__ import division
|
||||
import re
|
||||
|
||||
from devlib.instrument import Instrument, Measurement, INSTANTANEOUS
|
||||
|
@ -18,8 +18,7 @@ import re
|
||||
import tempfile
|
||||
from datetime import datetime
|
||||
from collections import defaultdict
|
||||
|
||||
from future.moves.itertools import zip_longest
|
||||
from itertools import zip_longest
|
||||
|
||||
from devlib.instrument import Instrument, MeasurementsCsv, CONTINUOUS
|
||||
from devlib.exception import TargetStableError, HostError
|
||||
|
@ -12,7 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
from __future__ import division
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
@ -18,7 +18,6 @@
|
||||
Miscellaneous functions that don't fit anywhere else.
|
||||
|
||||
"""
|
||||
from __future__ import division
|
||||
from contextlib import contextmanager
|
||||
from functools import partial, reduce, wraps
|
||||
from itertools import groupby
|
||||
|
@ -32,7 +32,6 @@ import weakref
|
||||
import select
|
||||
import copy
|
||||
import functools
|
||||
from future.utils import raise_from
|
||||
from shlex import quote
|
||||
|
||||
from paramiko.client import SSHClient, AutoAddPolicy, RejectPolicy
|
||||
@ -848,8 +847,8 @@ class TelnetConnection(SshConnectionBase):
|
||||
try:
|
||||
check_output(command, timeout=timeout, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise_from(HostError("Failed to copy file with '{}'. Output:\n{}".format(
|
||||
command_redacted, e.output)), None)
|
||||
msg = f"Failed to copy file with '{command_redacted}'. Output:\n{e.output}"
|
||||
raise HostError(msg) from None
|
||||
except TimeoutError as e:
|
||||
raise TimeoutError(command_redacted, e.output)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user