Skip to content

Commit

Permalink
Rubocop fix: Style/IndentationWidth
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 20, 2017
1 parent 6ddef5d commit 7d19465
Show file tree
Hide file tree
Showing 5 changed files with 192 additions and 192 deletions.
22 changes: 11 additions & 11 deletions src/clients/dasd_auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,40 +59,40 @@ def main

case @func
when "Summary"
@ret = HTML.List(DASDController.Summary)
@ret = HTML.List(DASDController.Summary)
when "Reset"
DASDController.Import({})
DASDController.Import({})
DASDController.SetModified(true)
@ret = {}
when "Change"
@ret = DASDAutoSequence()
@ret = DASDAutoSequence()
DASDController.SetModified(true)
when "Import"
@ret = DASDController.Import(@param)
@ret = DASDController.Import(@param)
DASDController.SetModified(true)
when "Export"
@ret = DASDController.Export
@ret = DASDController.Export
DASDController.SetModified(false)
when "GetModified"
@ret = DASDController.GetModified
@ret = DASDController.GetModified
when "SetModified"
DASDController.SetModified(true)
DASDController.SetModified(true)
@ret = true
when "Packages"
@ret = DASDController.AutoPackages
@ret = DASDController.AutoPackages
when "Read"
Yast.import "Progress"
Yast.import "Progress"
Progress.off
@ret = DASDController.Read
Progress.on
DASDController.SetModified(true)
when "Write"
Yast.import "Progress"
Yast.import "Progress"
Progress.off
@ret = DASDController.Write
Progress.on
else
Builtins.y2error("Unknown function: %1", @func)
Builtins.y2error("Unknown function: %1", @func)
@ret = false # Unknown function
end

Expand Down
22 changes: 11 additions & 11 deletions src/clients/zfcp_auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,40 +59,40 @@ def main

case @func
when "Summary"
@ret = HTML.List(ZFCPController.Summary)
@ret = HTML.List(ZFCPController.Summary)
when "Reset"
ZFCPController.Import({})
ZFCPController.Import({})
ZFCPController.SetModified(true)
@ret = {}
when "Change"
@ret = ZFCPAutoSequence()
@ret = ZFCPAutoSequence()
ZFCPController.SetModified(true)
when "Import"
@ret = ZFCPController.Import(@param)
@ret = ZFCPController.Import(@param)
ZFCPController.SetModified(true)
when "Export"
@ret = ZFCPController.Export
@ret = ZFCPController.Export
ZFCPController.SetModified(false)
when "GetModified"
@ret = ZFCPController.GetModified
@ret = ZFCPController.GetModified
when "SetModified"
ZFCPController.SetModified(true)
ZFCPController.SetModified(true)
@ret = true
when "Packages"
@ret = ZFCPController.AutoPackages
@ret = ZFCPController.AutoPackages
when "Read"
Yast.import "Progress"
Yast.import "Progress"
Progress.set(false)
@ret = ZFCPController.Read
Progress.set(true)
ZFCPController.SetModified(true)
when "Write"
Yast.import "Progress"
Yast.import "Progress"
Progress.set(false)
@ret = ZFCPController.Write
Progress.set(true)
else
Builtins.y2error("Unknown function: %1", @func)
Builtins.y2error("Unknown function: %1", @func)
@ret = false # Unknown function
end

Expand Down
10 changes: 5 additions & 5 deletions src/include/s390/dasd/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def PerformAction(action)
if !Mode.config
case action
when :activate, :deactivate
value = action == :activate
value = action == :activate
unformatted_disks = []

Builtins.foreach(selected) do |id|
Expand Down Expand Up @@ -275,7 +275,7 @@ def PerformAction(action)
return true

when :diag_off, :diag_on
value = action == :diag_on
value = action == :diag_on

Builtins.foreach(selected) do |id|
channel = Ops.get_string(
Expand All @@ -297,7 +297,7 @@ def PerformAction(action)

when :format
# check if disks are R/W and active
problem = ""
problem = ""
Builtins.foreach(selected) do |id|
active = Ops.get_boolean(
DASDController.devices,
Expand Down Expand Up @@ -377,15 +377,15 @@ def PerformAction(action)
else
case action
when :diag_off, :diag_on
value = action == :diag_on
value = action == :diag_on

Builtins.foreach(selected) do |id|
Ops.set(DASDController.devices, [id, "diag"], value)
end

return true
when :format_off, :format_on
value = action == :format_on
value = action == :format_on

Builtins.foreach(selected) do |id|
Ops.set(DASDController.devices, [id, "format"], value)
Expand Down
110 changes: 55 additions & 55 deletions src/modules/DASDController.rb
Original file line number Diff line number Diff line change
Expand Up @@ -439,82 +439,82 @@ def ReportActivationError(channel, ret)
when 0

when 1
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: sysfs not mounted."),
channel
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: sysfs not mounted."),
channel
)
)
when 2
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Invalid status for <online>."),
channel
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Invalid status for <online>."),
channel
)
)
when 3
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: No device found for <ccwid>."),
channel
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: No device found for <ccwid>."),
channel
)
)
when 4
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Could not change state of the device."),
channel
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Could not change state of the device."),
channel
)
)
when 5
# https://bugzilla.novell.com/show_bug.cgi?id=446998#c15
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Device is not a DASD."),
channel
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Device is not a DASD."),
channel
)
)
when 6
# https://bugzilla.novell.com/show_bug.cgi?id=446998#c15
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Could not load module."),
channel
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Could not load module."),
channel
)
)
when 7
# http://bugzilla.novell.com/show_bug.cgi?id=561876#c8
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Failed to activate DASD."),
channel
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Failed to activate DASD."),
channel
)
)
when 8
# http://bugzilla.novell.com/show_bug.cgi?id=561876#c8
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: DASD is not formatted."),
channel
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: DASD is not formatted."),
channel
)
)
else
Report.Error(
Builtins.sformat(
# error report, %1 is device identification, %2 is integer code
_("%1: Unknown error %2."),
channel,
ret
)
Report.Error(
Builtins.sformat(
# error report, %1 is device identification, %2 is integer code
_("%1: Unknown error %2."),
channel,
ret
)
)
end

nil
Expand Down
Loading

0 comments on commit 7d19465

Please sign in to comment.