aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/py/test_migration.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/py/test_migration.py b/test/py/test_migration.py
index 92c3292..7370b52 100644
--- a/test/py/test_migration.py
+++ b/test/py/test_migration.py
@@ -391,7 +391,7 @@ def test_handle_mig_data_read_short_write():
payload = bytes(mig_data_payload(data))
# don't send the last byte
- msg(ctx, sock, VFIO_USER_MIG_DATA_READ, payload[0:len(payload) - 1],
+ msg(ctx, sock, VFIO_USER_MIG_DATA_READ, payload[:-1],
expect=errno.EINVAL)
@@ -474,7 +474,7 @@ def test_device_feature_short_write():
payload = bytes(payload)
# don't send the last byte
- msg(ctx, sock, VFIO_USER_DEVICE_FEATURE, payload[0:len(payload) - 1],
+ msg(ctx, sock, VFIO_USER_DEVICE_FEATURE, payload[:-1],
expect=errno.EINVAL)