Skip to content

Commit ce49cde

Browse files
committed
fix(linstorvhdutil): don't log when get_hosts_attached_on() is empty
Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.tech>
1 parent da7074a commit ce49cde

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 = next(iter(util.get_hosts_attached_on(self._session, [vdi_uuid])))
114+
host_ref_attached = next(iter(util.get_hosts_attached_on(self._session, [vdi_uuid])), None)
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)