Skip to content

Commit 365ae23

Browse files
fix(linstorhostcall): use next iter instead of list conversion
Signed-off-by: Mathieu Labourier <mathieu.labourier@vates.tech>
1 parent 614cda9 commit 365ae23

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/linstorvhdutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def wrapper(*args, **kwargs):
111111
remote_args = {str(key): str(value) for key, value in remote_args.items()}
112112

113113
try:
114-
host_ref_attached = list(util.get_hosts_attached_on(self._session, [vdi_uuid]))[0]
114+
host_ref_attached = next(iter(util.get_hosts_attached_on(self._session, [vdi_uuid])))
115115
if host_ref_attached:
116116
response = call_remote_method(
117117
self._session, host_ref_attached, remote_method, device_path, remote_args

0 commit comments

Comments
 (0)