Skip to content

Commit

Permalink
Simplify file_spec logic
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Gurney <[email protected]>
  • Loading branch information
bgurney-rh committed Oct 16, 2023
1 parent 34dec32 commit 615b837
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions testlib/dbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,9 @@ def fs_create(pool_path, fs_name, *, fs_size=None, fs_sizelimit=None):
)

file_spec = (
(fs_name, (False, ""), (False, ""))
if fs_size is None
else (fs_name, (True, fs_size), (False, ""))
if fs_sizelimit is None
else (fs_name, (True, fs_size), (True, fs_sizelimit))
fs_name,
(False, "") if fs_size is None else (True, fs_size),
(False, "") if fs_sizelimit is None else (True, fs_sizelimit),
)

return iface.CreateFilesystems([file_spec], timeout=StratisDbus._TIMEOUT)
Expand Down

0 comments on commit 615b837

Please sign in to comment.