Skip to content

Commit

Permalink
Fixed Style/ElseAlignment
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jun 20, 2016
1 parent 95477b6 commit 4aeea62
Show file tree
Hide file tree
Showing 33 changed files with 74 additions and 74 deletions.
4 changes: 2 additions & 2 deletions library/commandline/src/modules/CommandLine.rb
Expand Up @@ -1276,9 +1276,9 @@ def GetInput(prompt, type)

res = if type == :nohistory
Convert.to_string(SCR.Read(path(".dev.tty.nohistory")))
elsif type == :noecho
elsif type == :noecho
Convert.to_string(SCR.Read(path(".dev.tty.noecho")))
else
else
Convert.to_string(SCR.Read(path(".dev.tty")))
end

Expand Down
10 changes: 5 additions & 5 deletions library/control/src/modules/ProductControl.rb
Expand Up @@ -561,9 +561,9 @@ def RequiredFiles(stage, mode)
Builtins.foreach(modules) do |m|
client = if Stage.firstboot
Ops.get_string(m, "name", "dummy")
elsif Builtins.issubstring(Ops.get_string(m, "name", "dummy"), "inst_")
elsif Builtins.issubstring(Ops.get_string(m, "name", "dummy"), "inst_")
Ops.get_string(m, "name", "dummy")
else
else
Ops.add("inst_", Ops.get_string(m, "name", "dummy"))
end
# FIXME: what about the ruby files?
Expand Down Expand Up @@ -858,7 +858,7 @@ def AddWizardSteps(stagemode)
Ops.get_string(m, "textdomain", ""),
Ops.get_string(m, "label", "")
)
else
else
Builtins.dgettext(
wizard_textdomain,
Ops.get_string(m, "label", "")
Expand All @@ -874,7 +874,7 @@ def AddWizardSteps(stagemode)
Ops.get_string(m, "textdomain", ""),
Ops.get_string(m, "label", "")
)
else
else
Builtins.dgettext(
wizard_textdomain,
Ops.get_string(m, "label", "")
Expand Down Expand Up @@ -1073,7 +1073,7 @@ def getProposals(stage, mode, proptype)
final_proposals,
[Ops.add(proposal_name, "_proposal"), order_value]
)
else
else
Builtins.add(
final_proposals,
[proposal_name, order_value]
Expand Down
6 changes: 3 additions & 3 deletions library/cwm/src/modules/CWM.rb
Expand Up @@ -459,9 +459,9 @@ def ValidateMaps(widgets)
end
to_check = if Ops.get(v, "widget") == :custom
["custom_widget"]
elsif Ops.get(v, "widget") == :empty
elsif Ops.get(v, "widget") == :empty
[]
else
else
["label", "widget"]
end
if !Builtins.haskey(v, "no_help")
Expand Down Expand Up @@ -809,7 +809,7 @@ def Run(widgets, functions, skip_store_for: [])
while ret != :back && ret != :abort && !save
event_descr = if Ops.greater_than(timeout, 0)
UI.WaitForEvent(timeout)
else
else
UI.WaitForEvent
end
ret = Ops.get(event_descr, "ID")
Expand Down
8 changes: 4 additions & 4 deletions library/cwm/src/modules/CWMServiceStart.rb
Expand Up @@ -333,7 +333,7 @@ def CreateAutoStartWidget(settings)
)
help = if Builtins.haskey(settings, "help")
Ops.get_string(settings, "help", "")
else
else
xinetd_available ? AutoStartXinetdHelp() : AutoStartHelp()
end

Expand Down Expand Up @@ -592,7 +592,7 @@ def CreateStartStopWidget(settings)

help = if Builtins.haskey(settings, "help")
Ops.get_string(settings, "help", "")
else
else
StartStopHelp(display_save_now)
end

Expand All @@ -602,7 +602,7 @@ def CreateStartStopWidget(settings)
Opt(:hstretch),
save_now_button
)
else
else
VBox()
end

Expand Down Expand Up @@ -770,7 +770,7 @@ def CreateLdapWidget(settings)
)
help = if Builtins.haskey(settings, "help")
Ops.get_string(settings, "help", "")
else
else
EnableLdapHelp()
end

Expand Down
10 changes: 5 additions & 5 deletions library/cwm/src/modules/CWMTable.rb
Expand Up @@ -337,19 +337,19 @@ def CreateTableDescr(attrib, widget_descr)
ValidateTableAttr(attrib)
add_button = if Ops.get_boolean(attrib, "add_delete_buttons", true)
PushButton(Id(:_tw_add), Opt(:key_F3, :notify), Label.AddButton)
else
else
HSpacing(0)
end

edit_button = if Ops.get_boolean(attrib, "edit_button", true)
PushButton(Id(:_tw_edit), Opt(:key_F4, :notify), Label.EditButton)
else
else
HSpacing(0)
end

delete_button = if Ops.get_boolean(attrib, "add_delete_buttons", true)
PushButton(Id(:_tw_delete), Opt(:key_F5, :notify), Label.DeleteButton)
else
else
HSpacing(0)
end

Expand All @@ -361,7 +361,7 @@ def CreateTableDescr(attrib, widget_descr)
Opt(:notify),
Ops.get_string(attrib, "custom_button_name", "Custom button")
)
else
else
HSpacing(0)
end

Expand All @@ -374,7 +374,7 @@ def CreateTableDescr(attrib, widget_descr)
PushButton(Id(:_tw_down), Opt(:notify), _("&Down")),
VStretch()
)
else
else
HSpacing(0)
end

Expand Down
16 changes: 8 additions & 8 deletions library/cwm/src/modules/TablePopup.rb
Expand Up @@ -800,11 +800,11 @@ def TableHandle(descr, key, event_descr)
end
step = if current_index == 0
1
elsif Ops.add(current_index, 1) == Builtins.size(id_list)
elsif Ops.add(current_index, 1) == Builtins.size(id_list)
-1
elsif Ops.greater_or_equal(current_index, previous_index)
elsif Ops.greater_or_equal(current_index, previous_index)
1
else
else
-1
end
new_index = Ops.add(current_index, step)
Expand Down Expand Up @@ -860,19 +860,19 @@ def CreateTableDescr(attrib, widget_descr)

add_button = if Ops.get_boolean(attrib, "add_delete_buttons", true)
PushButton(Id(:_tp_add), Opt(:key_F3), Label.AddButton)
else
else
HSpacing(0)
end

edit_button = if Ops.get_boolean(attrib, "edit_button", true)
PushButton(Id(:_tp_edit), Opt(:key_F4), Label.EditButton)
else
else
HSpacing(0)
end

delete_button = if Ops.get_boolean(attrib, "add_delete_buttons", true)
PushButton(Id(:_tp_delete), Opt(:key_F5), Label.DeleteButton)
else
else
HSpacing(0)
end

Expand All @@ -885,7 +885,7 @@ def CreateTableDescr(attrib, widget_descr)
# table header
_("Value")
)
else
else
Header(
# table header
_("Option"),
Expand Down Expand Up @@ -942,7 +942,7 @@ def CreateTableDescr(attrib, widget_descr)
PushButton(Id(:_tp_down), _("&Down")),
VStretch()
)
else
else
HSpacing(0)
end

Expand Down
2 changes: 1 addition & 1 deletion library/cwm/src/modules/WizardHW.rb
Expand Up @@ -139,7 +139,7 @@ def Handle(_key, event)
if Ops.get(event, "ID") == :_hw_items
descr = if @get_item_descr_callback.nil?
Ops.get(@descriptions, current, "")
else
else
@get_item_descr_callback.call(current)
end
UI.ChangeWidget(Id(:_hw_sum), :Value, descr)
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/lib/ui/service_status.rb
Expand Up @@ -57,7 +57,7 @@ def initialize(service, reload_flag: true, reload_flag_label: :reload)
textdomain "base"
@reload_label = if reload_flag_label == :restart
_("Restart After Saving Settings")
else
else
_("Reload After Saving Settings")
end
end
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/modules/Misc.rb
Expand Up @@ -113,7 +113,7 @@ def SysconfigWrite(level, values)
result = true
level = if level == path(".")
path(".sysconfig")
else
else
Ops.add(path(".sysconfig"), level)
end

Expand Down
4 changes: 2 additions & 2 deletions library/general/src/modules/Popup.rb
Expand Up @@ -1798,7 +1798,7 @@ def AnyTimedRichMessage(headline, message, timeout)
def ShowTextTimed(headline, text, timeout)
heading = if Builtins.size(headline) == 0
VSpacing(0.2)
else
else
Heading(headline)
end

Expand Down Expand Up @@ -1853,7 +1853,7 @@ def ShowTextTimed(headline, text, timeout)
def ShowText(headline, text)
heading = if Builtins.size(headline) == 0
VSpacing(0.2)
else
else
Heading(headline)
end

Expand Down
4 changes: 2 additions & 2 deletions library/general/src/modules/Report.rb
Expand Up @@ -366,7 +366,7 @@ def AnyQuestion(headline, message, yes_button_message, no_button_message, focus)
focus,
@timeout_yesno_messages
)
else
else
Popup.AnyQuestion(
headline,
message,
Expand Down Expand Up @@ -402,7 +402,7 @@ def ErrorAnyQuestion(headline, message, yes_button_message, no_button_message, f
focus,
@timeout_yesno_messages
)
else
else
Popup.ErrorAnyQuestion(
headline,
message,
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/modules/Summary.rb
Expand Up @@ -80,7 +80,7 @@ def DevicesList(devices)
text = if !Mode.config
# translators: summary if no hardware was detected
Builtins.sformat("<ul><li>%1</li></ul>", _("Not detected."))
else
else
Builtins.sformat("<ul><li>%1</li></ul>", NotConfigured())
end
else
Expand Down
2 changes: 1 addition & 1 deletion library/log/src/modules/LogView.rb
Expand Up @@ -201,7 +201,7 @@ def CreateHelp(logs, parameters)
if Ops.greater_or_equal(actions, 2)
help = if save
Ops.add(help, AdvancedSaveHelp(adv_button))
else
else
Ops.add(help, AdvancedHelp(adv_button))
end
elsif save
Expand Down
10 changes: 5 additions & 5 deletions library/network/src/lib/network/susefirewall2.rb
Expand Up @@ -1099,7 +1099,7 @@ def GetZonesOfInterfacesWithAnyFeatureSupported(interfaces)
# interface is covered by 'any' in 'EXT'
zone = if Builtins.contains(interfaces_covered_by_any, interface)
@special_all_interface_zone
else
else
# interface is explicitely mentioned in some zone
GetZoneOfInterface(interface)
end
Expand Down Expand Up @@ -2171,17 +2171,17 @@ def GetLoggingSettings(rule)
if rule == "ACCEPT"
ret_val = if Ops.get_string(@SETTINGS, "FW_LOG_ACCEPT_ALL", "no") == "yes"
"ALL"
elsif Ops.get_string(@SETTINGS, "FW_LOG_ACCEPT_CRIT", "yes") == "yes"
elsif Ops.get_string(@SETTINGS, "FW_LOG_ACCEPT_CRIT", "yes") == "yes"
"CRIT"
else
else
"NONE"
end
elsif rule == "DROP"
ret_val = if Ops.get_string(@SETTINGS, "FW_LOG_DROP_ALL", "no") == "yes"
"ALL"
elsif Ops.get_string(@SETTINGS, "FW_LOG_DROP_CRIT", "yes") == "yes"
elsif Ops.get_string(@SETTINGS, "FW_LOG_DROP_CRIT", "yes") == "yes"
"CRIT"
else
else
"NONE"
end
else
Expand Down
2 changes: 1 addition & 1 deletion library/network/src/lib/network/susefirewalld.rb
Expand Up @@ -143,7 +143,7 @@ def sf2_to_firewalld_service(service)
# First, let's strip off 'service:' from service name if present.
tmp_service = if service.include?("service:")
service.partition(":")[2]
else
else
service
end

Expand Down
8 changes: 4 additions & 4 deletions library/network/src/modules/CWMFirewallInterfaces.rb
Expand Up @@ -109,7 +109,7 @@ def SetFirewallLabel(status)
_(
"Firewall cannot be adjusted during first stage installation."
)
else
else
# label
_("Firewall package is not installed.")
end
Expand Down Expand Up @@ -151,7 +151,7 @@ def InitAllInterfacesList
zone = SuSEFirewall.GetZoneOfInterface(i)
zone = if !zone.nil? && zone != ""
SuSEFirewall.GetZoneFullName(zone)
else
else
_("Interface is not assigned to any zone")
end
if label == "static" || label == "" || label.nil?
Expand All @@ -164,7 +164,7 @@ def InitAllInterfacesList
end
label = if label.nil? || label == ""
i
else
else
Builtins.sformat("%1 (%2 / %3)", i, label, zone)
end
Item(Id(i), label)
Expand Down Expand Up @@ -1063,7 +1063,7 @@ def CreateOpenFirewallWidget(settings)
Ops.get_boolean(settings, "display_details", false)
help = if Builtins.haskey(settings, "help")
Ops.get_string(settings, "help", "")
else
else
OpenFirewallHelp(display_firewall_details)
end

Expand Down
2 changes: 1 addition & 1 deletion library/network/src/modules/Internet.rb
Expand Up @@ -129,7 +129,7 @@ def Start(log)

ret = if @askpassword == true
SCR.Execute(path(".target.bash_input"), cmd, @password)
else
else
SCR.Execute(path(".target.bash"), cmd)
end
if ret != 0
Expand Down
2 changes: 1 addition & 1 deletion library/network/src/modules/NetworkConfig.rb
Expand Up @@ -116,7 +116,7 @@ def WriteConfig(config, data)
oldval = Convert.to_string(SCR.Read(Builtins.add(config, var)))
newval = if Ops.is_boolean?(val)
Convert.to_boolean(val) ? "yes" : "no"
else
else
Builtins.sformat("%1", val)
end
if oldval.nil? || oldval != newval
Expand Down

0 comments on commit 4aeea62

Please sign in to comment.