Skip to content

Commit

Permalink
Py3
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-usielski committed Feb 6, 2024
1 parent b41dc5e commit 2b98226
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
8 changes: 4 additions & 4 deletions moler/util/devices_SM.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,19 @@ def _perform_device_tests(
)
tested.add((source_state, target_state))
if device.last_wrong_wait4_occurrence is not None:
msg = "More than 1 prompt match the same line!: '{}' in change state {} -> {} -> {}".format(
msg = "More than 1 prompt match the same line!: '{}' in change state '{}' -> '{}' -> '{}'".format(
device.last_wrong_wait4_occurrence,
state_before_test,
state_before_test,
source_state,
target_state,
)
raise MolerException(msg)
except Exception as exc:
raise MolerException(
"Cannot trigger change state: '{}' -> '{}'. Successful tests: {}\n{}\nAlready tested '{}'.".format(
source_state, target_state, test_nr, exc, tested
)
)
) from exc
test_nr += 1
if max_time is not None and time.monotonic() - start_time > max_time:
return
Expand Down Expand Up @@ -323,7 +323,7 @@ def _inject_deferred(self):
"Available outputs for the state: '{}'.\n"
"Please update your device_output dict!\n"
"{}".format(cmd_data_string, self.device.state, available_outputs, exc)
)
) from exc

def write(self, input_bytes):
"""
Expand Down
7 changes: 0 additions & 7 deletions moler/util/moler_serial_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
import platform
import traceback

# https://stackoverflow.com/questions/4915361/whats-the-difference-between-raw-input-and-input-in-python-3
# forcing 'input' to mean same in Python2 and Python3:
try:
# noinspection PyUnresolvedReferences
input = raw_input
except NameError:
pass

hostname = platform.node()

Expand Down

0 comments on commit 2b98226

Please sign in to comment.