Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Apr 13, 2018
1 parent 6108f0a commit 5f23a99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/clients/ntp-client_proposal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Yast
class NtpClientProposalClient < Client
include Yast::Logger

REQUIRED_PACKAGE ||= "chrony"
REQUIRED_PACKAGE ||= "chrony".freeze

def main
Yast.import "UI"
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/lib/y2ntp_client/client/finish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down

0 comments on commit 5f23a99

Please sign in to comment.