From 5f23a991a5fdc34ea8daad56c31f93d61d846d42 Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Fri, 13 Apr 2018 10:33:58 +0200 Subject: [PATCH] rubocop --- src/clients/ntp-client_proposal.rb | 7 ++++--- src/lib/y2ntp_client/client/finish.rb | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/clients/ntp-client_proposal.rb b/src/clients/ntp-client_proposal.rb index bcd9f38c..106bc141 100644 --- a/src/clients/ntp-client_proposal.rb +++ b/src/clients/ntp-client_proposal.rb @@ -8,7 +8,7 @@ module Yast class NtpClientProposalClient < Client include Yast::Logger - REQUIRED_PACKAGE ||= "chrony" + REQUIRED_PACKAGE ||= "chrony".freeze def main Yast.import "UI" @@ -410,11 +410,12 @@ def ui_handle(ui) if ui == :accept && Stage.initial # checking if chrony is available for installation. if UI.QueryWidget(Id(:ntp_save), :Value) == true && - !Pkg.IsAvailable(REQUIRED_PACKAGE) + !Pkg.IsAvailable(REQUIRED_PACKAGE) Report.Error(Builtins.sformat( # TRANSLATORS: Popup message. %1 is the missing package name. _("Cannot save NTP configuration because the package %1 is not available."), - REQUIRED_PACKAGE)) + REQUIRED_PACKAGE + )) UI.ChangeWidget(Id(:ntp_save), :Value, false) redraw = true end diff --git a/src/lib/y2ntp_client/client/finish.rb b/src/lib/y2ntp_client/client/finish.rb index 8926095d..3cbddda1 100644 --- a/src/lib/y2ntp_client/client/finish.rb +++ b/src/lib/y2ntp_client/client/finish.rb @@ -12,7 +12,7 @@ module Client class Finish < Installation::FinishClient include Yast::I18n - REQUIRED_PACKAGE ||= "chrony" + REQUIRED_PACKAGE ||= "chrony".freeze def initialize textdomain "ntp-client" @@ -31,8 +31,9 @@ def write Report.Error(Builtins.sformat( # TRANSLATORS: Popup message. %1 is the missing package name. _("Cannot save NTP configuration because the package %1 is not installed."), - REQUIRED_PACKAGE)) - return false + REQUIRED_PACKAGE + )) + return false end # bnc#449615, must merge the configs which Export/Import fails to do.