Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Apr 30, 2024
1 parent 38d3743 commit 2bfe9f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lib/bootloader/bootloader_factory.rb
Expand Up @@ -99,7 +99,7 @@ def bootloader_by_name(name)
nil # in other cases it means that read failed
end
end
# rubocop:enable Metrics/CyclomaticComplexity
# rubocop:enable Metrics/CyclomaticComplexity

private

Expand Down
14 changes: 6 additions & 8 deletions src/lib/bootloader/generic_widgets.rb
Expand Up @@ -156,14 +156,13 @@ def help
end

def init
if Bootloader::BootloaderFactory.current.respond_to?(:cpu_mitigations)
self.value = Bootloader::BootloaderFactory.current.cpu_mitigations.value.to_s
else
disable
end
if Bootloader::BootloaderFactory.current.respond_to?(:cpu_mitigations)
self.value = Bootloader::BootloaderFactory.current.cpu_mitigations.value.to_s
else
disable
end
end


def store
if enabled?
Bootloader::BootloaderFactory.current.cpu_mitigations =
Expand Down Expand Up @@ -207,8 +206,7 @@ def store
current_bl = ::Bootloader::BootloaderFactory.current
if current_bl.is_a?(::Bootloader::SystemdBoot)
current_bl.kernel_params.replace(value)
elsif
current_bl.grub_default.kernel_params.replace(value)
elsif current_bl.grub_default.kernel_params.replace(value)
else
log.error("Bootloader type #{current_bl} not found.")
end
Expand Down

0 comments on commit 2bfe9f8

Please sign in to comment.