Skip to content

Commit

Permalink
Fix pure array driver pylint errors
Browse files Browse the repository at this point in the history
opensvc/drivers/array/pure.py:872:16: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
opensvc/drivers/array/pure.py:880:20: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
opensvc/drivers/array/pure.py:888:20: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
opensvc/drivers/array/pure.py:895:20: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
opensvc/drivers/array/pure.py:899:20: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
  • Loading branch information
cvaroqui committed Sep 14, 2022
1 parent f4083fd commit a1af47d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions opensvc/drivers/array/pure.py
Expand Up @@ -869,34 +869,34 @@ def del_map(self, id=None, name=None, serial=None, mappings=None, host=None, hos
results = []
if mappings is not None and hostgroup is None:
for host, hba_ids in self.mappings_to_hosts(mappings).items():
map_data = self._del_map(id=id, name=name, serial=serial, host=host, **kwargs)
self._del_map(id=id, name=name, serial=serial, host=host, **kwargs)
results += [host]
else:
hostgroup_deleted = set()
for c in self.get_volume_connections(id=id, name=name, serial=serial):
if host:
if c["host"]["name"] != host:
continue
map_data = self._del_map(id=id, name=name, serial=serial, host=c["host"]["name"], **kwargs)
self._del_map(id=id, name=name, serial=serial, host=c["host"]["name"], **kwargs)
results += [c]
elif hostgroup:
if c["host_group"]["name"] != hostgroup:
continue
if c["host_group"]["name"] in hostgroup_deleted:
results += [c]
continue
map_data = self._del_map(id=id, name=name, serial=serial, hostgroup=c["host_group"]["name"], **kwargs)
self._del_map(id=id, name=name, serial=serial, hostgroup=c["host_group"]["name"], **kwargs)
results += [c]
hostgroup_deleted.add(c["host_group"]["name"])
elif c["host_group"]["name"]:
if c["host_group"]["name"] in hostgroup_deleted:
results += [c]
continue
map_data = self._del_map(id=id, name=name, serial=serial, hostgroup=c["host_group"]["name"], **kwargs)
self._del_map(id=id, name=name, serial=serial, hostgroup=c["host_group"]["name"], **kwargs)
results += [c]
hostgroup_deleted.add(c["host_group"]["name"])
else:
map_data = self._del_map(id=id, name=name, serial=serial, host=c["host"]["name"], **kwargs)
self._del_map(id=id, name=name, serial=serial, host=c["host"]["name"], **kwargs)
results += [c]
return results

Expand All @@ -911,7 +911,7 @@ def _del_map(self, id=None, name=None, serial=None, host=None, hostgroup=None, *
params["host_group_names"] = hostgroup
if host:
params["host_names"] = host
ret = self.delete("/connections", params=params)
self.delete("/connections", params=params)

def del_diskinfo(self, disk_id):
if disk_id in (None, ""):
Expand Down

0 comments on commit a1af47d

Please sign in to comment.