Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
richm committed Feb 15, 2024
1 parent 386c697 commit 4f5ce20
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/library/find_unused_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,31 +194,31 @@ def run_module():
interface = module.params["with_interface"]

if interface is not None and not is_device_interface(module, path, interface):
info.append("Disk {} attrs {} is not an interface {}".format(path, attrs, interface))
info.append("Disk [%s] attrs [%s] is not an interface [%s]" % (path, attrs, interface))
continue

if attrs["fstype"]:
info.append("Disk {} attrs {} has fstype".format(path, attrs))
info.append("Disk [%s] attrs [%s] has fstype" % (path, attrs))
continue

if Size(attrs["size"]).bytes < Size(module.params["min_size"]).bytes:
info.append("Disk {} attrs {} size is less than requested".format(path, attrs))
info.append("Disk [%s] attrs [%s] size is less than requested" % (path, attrs))
continue

if max_size.bytes > 0 and Size(attrs["size"]).bytes > max_size.bytes:
info.append("Disk {} attrs {} size is greater than requested".format(path, attrs))
info.append("Disk [%s] attrs [%s] size is greater than requested" % (path, attrs))
continue

if get_partitions(path):
info.append("Disk {} attrs {} has partitions".format(path, attrs))
info.append("Disk [%s] attrs [%s] has partitions" % (path, attrs))
continue

if not no_holders(get_sys_name(path)):
info.append("Disk {} attrs {} has holders".format(path, attrs))
info.append("Disk [%s] attrs [%s] has holders" % (path, attrs))
continue

if not can_open(path):
info.append("Disk {} attrs {} cannot be opened exclusively".format(path, attrs))
info.append("Disk [%s] attrs [%s] cannot be opened exclusively" % (path, attrs))
continue

result["disks"].append(os.path.basename(path))
Expand Down

0 comments on commit 4f5ce20

Please sign in to comment.