Skip to content

Commit dd74d21

Browse files
Merge pull request #35 from bridadan/fix_imports
Fix improper imports and uses of modules/function
2 parents 8db10c1 + 2c6f193 commit dd74d21

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

mbed_os_tools/detect/lstools_base.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,6 @@ def get_supported_platforms(self, device_type=None):
449449
items = self.plat_db.items(**kwargs)
450450
return {i[0]: i[1] for i in items}
451451

452-
def __str__(self):
453-
"""! Object to string casting
454-
455-
@return Stringified class object should be prettytable formated string
456-
"""
457-
return self.get_string()
458-
459452
# Private functions supporting API
460453
def _read_htm_ids(self, mount_point):
461454
"""! Function scans mbed.htm to get information about TargetID.

mbed_os_tools/test/host_tests_plugins/host_test_plugins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def check_mount_point_ready(self, destination_disk, init_delay=0.2, loop_delay=0
137137
for i in range(timeout):
138138
# mbed_os_tools.detect.create() should be done inside the loop.
139139
# Otherwise it will loop on same data.
140-
mbeds = mbed_os_tools.detect.create()
140+
mbeds = detect.create()
141141
mbed_list = mbeds.list_mbeds() #list of mbeds present
142142
# get first item in list with a matching target_id, if present
143143
mbed_target = next((x for x in mbed_list if x['target_id']==target_id), None)
@@ -190,7 +190,7 @@ def check_serial_port_ready(self, serial_port, target_id=None, timeout=60):
190190
timeout = int(timeout / timeout_step)
191191
for i in range(timeout):
192192
# mbed_os_tools.detect.create() should be done inside the loop. Otherwise it will loop on same data.
193-
mbeds = mbed_os_tools.detect.create()
193+
mbeds = detect.create()
194194
mbed_list = mbeds.list_mbeds() #list of mbeds present
195195
# get first item in list with a matching target_id, if present
196196
mbed_target = next((x for x in mbed_list if x['target_id']==target_id), None)

mbed_os_tools/test/host_tests_runner/mbed_base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import json
2121
import os
2222
from time import sleep
23-
import ..host_tests_plugins as ht_plugins
23+
from .. import host_tests_plugins as ht_plugins
2424
from ... import detect
2525
from .. import DEFAULT_BAUD_RATE
2626
from ..host_tests_logger import HtrunLogger
@@ -125,7 +125,7 @@ def check_flash_error(target_id, disk, initial_remount_count):
125125
# Re-try at max 5 times with 0.5 sec in delay
126126
for i in range(5):
127127
# mbed_os_tools.detect.create() should be done inside the loop. Otherwise it will loop on same data.
128-
mbeds = mbed_os_tools.detect.create()
128+
mbeds = detect.create()
129129
mbed_list = mbeds.list_mbeds() #list of mbeds present
130130
# get first item in list with a matching target_id, if present
131131
mbed_target = next((x for x in mbed_list if x['target_id']==target_id), None)
@@ -234,4 +234,3 @@ def hw_reset(self):
234234
self.port = device_info['serial_port']
235235
self.disk = device_info['mount_point']
236236
return result
237-

0 commit comments

Comments
 (0)