Skip to content

Commit

Permalink
changed to not to simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanholen-hpe committed Nov 7, 2024
1 parent 91b989a commit 2fd3fd4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sat/cli/bootprep/input/session_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ def validate_rootfs_provider_has_value(self, **_):
Raises:
InputItemValidateError: if the rootfs_provider is an empty string
"""
rootfs_provider_has_value = self.boot_sets['rootfs_provider'] is not ""
if rootfs_provider_has_value:
if not self.boot_sets['rootfs_provider']:
return
else:
raise InputItemValidateError(f'The value of rootfs_provider cannot be an empty string')
Expand All @@ -128,8 +127,7 @@ def validate_rootfs_provider_passthrough_has_value(self, **_):
Raises:
InputItemValidateError: if the rootfs_provider_passthrough is an empty string
"""
rootfs_provider_passthrough_has_value = self.boot_sets['rootfs_provider_passthrough'] is not ""
if rootfs_provider_passthrough_has_value:
if not self.boot_sets['rootfs_provider_passthrough']:
return
else:
raise InputItemValidateError(f'The value of rootfs_provider_passthrough cannot be an empty string')
Expand Down

0 comments on commit 2fd3fd4

Please sign in to comment.