Skip to content

Commit

Permalink
Fixed Style/ClosingParenthesisIndentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jul 14, 2016
1 parent 9a39d68 commit 13f22c0
Show file tree
Hide file tree
Showing 40 changed files with 342 additions and 342 deletions.
4 changes: 2 additions & 2 deletions library/commandline/src/modules/CommandLine.rb
Expand Up @@ -1155,7 +1155,7 @@ def Init(cmdlineinfo, args)
if !Builtins.haskey(
Ops.get_map(cmdlineinfo, "actions", {}),
mapaction
)
)
Builtins.y2error(
"Command line specification maps undefined action '%1'",
mapaction
Expand All @@ -1171,7 +1171,7 @@ def Init(cmdlineinfo, args)
if !Builtins.haskey(
Ops.get_map(cmdlineinfo, "options", {}),
Convert.to_string(mapopt)
)
)
Builtins.y2error(
"Command line specification maps undefined option '%1' for action '%2'",
mapopt,
Expand Down
10 changes: 5 additions & 5 deletions library/control/src/modules/DebugHooks.rb
Expand Up @@ -56,7 +56,7 @@ def Checkpoint(filename, at_entry)
if Ops.greater_or_equal(
WFM.Read(path(".local.size"), Ops.add("/tmp/", filename)),
0
)
)
if at_entry
Popup.Message(Builtins.sformat("Entry: %1", filename))
else
Expand Down Expand Up @@ -111,15 +111,15 @@ def Run(filename, at_entry)
Builtins.sformat("%1/%2_pre.sh", @tmp_dir, filename)
),
0
)
)
ExecuteScript(Builtins.sformat("%1_pre.sh", filename), "shell")
elsif Ops.greater_than(
WFM.Read(
path(".local.size"),
Builtins.sformat("%1/%2_pre.pl", @tmp_dir, filename)
),
0
)
)
ExecuteScript(Builtins.sformat("%1_pre.pl", filename), "perl")
else
Builtins.y2debug(
Expand All @@ -135,15 +135,15 @@ def Run(filename, at_entry)
Builtins.sformat("%1/%2_post.sh", @tmp_dir, filename)
),
0
)
)
ExecuteScript(Builtins.sformat("%1_post.sh", filename), "shell")
elsif Ops.greater_than(
WFM.Read(
path(".local.size"),
Builtins.sformat("%1/%2_post.pl", @tmp_dir, filename)
),
0
)
)
ExecuteScript(Builtins.sformat("%1_post.pl", filename), "perl")
else
Builtins.y2debug(
Expand Down
8 changes: 4 additions & 4 deletions library/control/src/modules/ProductControl.rb
Expand Up @@ -262,7 +262,7 @@ def checkDisabled(mod)
if Builtins.contains(
@DisabledProposals,
Ops.get_string(mod, "proposal", "")
)
)
return true
end
# Normal step
Expand Down Expand Up @@ -311,7 +311,7 @@ def ReadControlFile(controlfile)
Ops.get_list(@productControl, ["partitioning", "partitions"], [])
),
0
)
)
partitioning = Ops.get_map(@productControl, "partitioning", {})
ProductFeatures.SetBooleanFeature(
"partitioning",
Expand Down Expand Up @@ -1350,7 +1350,7 @@ def RunFrom(from, allow_back)
path(".target.string"),
Installation.current_step,
step_id
)
)
Builtins.y2error("Error writing step identifier")
end
end
Expand Down Expand Up @@ -1384,7 +1384,7 @@ def RunFrom(from, allow_back)
!Stage.initial
if !Convert.to_boolean(
SCR.Execute(path(".target.remove"), Installation.current_step)
)
)
Builtins.y2error("Error removing step identifier")
end
end
Expand Down
4 changes: 2 additions & 2 deletions library/control/src/modules/WorkflowManager.rb
Expand Up @@ -1218,7 +1218,7 @@ def IntegrateWorkflow(filename)
Ops.get_map(update_file, "update", {}),
name,
Ops.get_string(update_file, "textdomain", "control")
)
)
Builtins.y2error("Failed to update installation workflow")
return false
end
Expand All @@ -1240,7 +1240,7 @@ def IntegrateWorkflow(filename)

if !UpdateInstFinish(
Ops.get_map(update_file, ["update", "inst_finish"], {})
)
)
Builtins.y2error("Adding inst_finish steps failed")
return false
end
Expand Down
2 changes: 1 addition & 1 deletion library/cwm/src/modules/CWM.rb
Expand Up @@ -669,7 +669,7 @@ def validateWidget(widget, event, key)
if !Builtins.regexpmatch(
Convert.to_string(UI.QueryWidget(Id(:_tp_value), :Value)),
regexp
)
)
failed = true
end
elsif val_type == :list
Expand Down
6 changes: 3 additions & 3 deletions library/cwm/src/modules/CWMTsigKeys.rb
Expand Up @@ -373,7 +373,7 @@ def Handle(widget, _key, event)
# yes-no popup
if !Popup.YesNo(
_("The key with the specified ID exists and is used.\nRemove it?")
)
)
return nil
else
remove_file = Key2File(key2)
Expand All @@ -395,7 +395,7 @@ def Handle(widget, _key, event)
_(
"A key with the specified ID was found\non your disk. Remove it?"
)
)
)
SCR.Execute(
path(".target.bash"),
Builtins.sformat(
Expand Down Expand Up @@ -464,7 +464,7 @@ def Handle(widget, _key, event)
"identifier as some of already present keys.\n" \
"Old keys will be removed. Continue?"
)
)
)
return nil
else
Builtins.foreach(coliding_files) { |f| RemoveTSIGKeyFile(f) }
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/modules/Arch.rb
Expand Up @@ -236,7 +236,7 @@ def board_compatible
if Builtins.issubstring(
Ops.get_string(device_type, "stdout", ""),
"chrp"
)
)
@_board_compatible = "CHRP"
end
# Maple has its own way of pretenting OF1275 compliance
Expand Down
8 changes: 4 additions & 4 deletions library/general/src/modules/AsciiFile.rb
Expand Up @@ -115,7 +115,7 @@ def AssertLineValid(file, line)
if Ops.less_than(
Builtins.size(text),
Ops.get_integer(file.value, ["widths", num], 0)
)
)
lstr = Ops.add(
lstr,
Builtins.substring(
Expand Down Expand Up @@ -157,7 +157,7 @@ def ReadFile(file, pathname)
if Ops.greater_than(
Builtins.size(Ops.get_string(file.value, "comment", "")),
0
) &&
) &&
Builtins.regexpmatch(
line,
Ops.get_string(file.value, "comment", "")
Expand Down Expand Up @@ -266,13 +266,13 @@ def ChangeLineField(file, line, field, entry)
if Ops.less_than(
Builtins.size(Ops.get_list(file.value, ["l", line, "fields"], [])),
field
)
)
changed = true
i = 0
while Ops.less_than(i, field)
if Builtins.size(
Ops.get_string(file.value, ["l", line, "fields", i], "")
) == 0
) == 0
Ops.set(file.value, ["l", line, "fields", i], "")
end
i = Ops.add(i, 1)
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/modules/Distro.rb
Expand Up @@ -68,7 +68,7 @@ def debian
if SCR.Execute(
path(".target.bash"),
"grep DISTRIB_ID=Ubuntu /etc/lsb-release"
) == 0
) == 0
@_distro = "debian"
Builtins.y2milestone("Found Debian/Ubuntu")
end
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/modules/FileUtils.rb
Expand Up @@ -306,7 +306,7 @@ def CheckAndCreatePath(pathvalue)
_("The path %1 does not exist.\nCreate it now?\n"),
pathvalue
)
)
)
# Directory creation successful
if Convert.to_boolean(SCR.Execute(path(".target.mkdir"), check_path))
Builtins.y2milestone(
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/modules/Linuxrc.rb
Expand Up @@ -180,7 +180,7 @@ def SaveInstallInf(root)
root
)
)
) != 0
) != 0
Builtins.y2error(
"Cannot SaveInstallInf %1 to %2",
inst_if_file,
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/modules/Misc.rb
Expand Up @@ -123,7 +123,7 @@ def SysconfigWrite(level, values)
if !SCR.Write(
Ops.add(level, Ops.get_path(entry, 0, path("."))),
Ops.get_string(entry, 1, "")
)
)
result = false
end
end
Expand Down
4 changes: 2 additions & 2 deletions library/general/src/modules/Mode.rb
Expand Up @@ -175,7 +175,7 @@ def SetMode(new_mode)
"autoupgrade"
],
new_mode
)
)
Builtins.y2error("Unknown mode %1", new_mode)
end

Expand Down Expand Up @@ -208,7 +208,7 @@ def SetTest(new_test_mode)
if !Builtins.contains(
["none", "test", "demo", "screenshot", "testsuite"],
new_test_mode
)
)
Builtins.y2error("Unknown test mode %1", new_test_mode)
end
@_test = new_test_mode
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/modules/Stage.rb
Expand Up @@ -73,7 +73,7 @@ def Set(new_stage)
if !Builtins.contains(
["normal", "initial", "continue", "firstboot", "hardware_probed"],
new_stage
)
)
Builtins.y2error("Unknown stage %1", new_stage)
end

Expand Down
2 changes: 1 addition & 1 deletion library/gpg/src/modules/GPG.rb
Expand Up @@ -320,7 +320,7 @@ def SignFile(keyid, file, passphrase, ascii_signature)
SCR.Read(path(".target.size"), Ops.add(file, suffix))
),
0
)
)
# remove the existing key
SCR.Execute(
path(".target.bash"),
Expand Down
2 changes: 1 addition & 1 deletion library/log/src/modules/LogViewCore.rb
Expand Up @@ -89,7 +89,7 @@ def DeleteOldLines
if Ops.greater_than(
Ops.subtract(Ops.subtract(Builtins.size(@lines), max_lines), 1),
0
)
)
@lines = Builtins.sublist(
@lines,
Ops.subtract(Ops.subtract(Builtins.size(@lines), max_lines), 1)
Expand Down
4 changes: 2 additions & 2 deletions library/network/src/lib/network/susefirewall2.rb
Expand Up @@ -618,7 +618,7 @@ def IsBroadcastAllowed(needed_ports, zone)
if !Builtins.contains(
Ops.get(allowed_ports_divided, "ports", []),
needed_port
) &&
) &&
!PortRanges.PortIsInPortranges(
needed_port,
Ops.get(allowed_ports_divided, "port_ranges", [])
Expand Down Expand Up @@ -2471,7 +2471,7 @@ def CheckKernelModules
if Ops.greater_or_equal(
Builtins.size(GetServicesAcceptRelated(one_zone)),
0
)
)
Builtins.y2milestone("Some ServicesAcceptRelated are defined")
needs_additional_module = true
raise Break
Expand Down
6 changes: 3 additions & 3 deletions library/network/src/lib/network/susefirewall2services.rb
Expand Up @@ -381,7 +381,7 @@ def ReadServicesDefinedByRPMPackages
if !SCR.RegisterAgent(
path(".firewall_service_definition"),
term(:ag_ini, term(:SysConfigFile, filefullpath))
)
)
log.error "Cannot register agent for #{filefullpath}"
next
end
Expand Down Expand Up @@ -415,7 +415,7 @@ def ReadServicesDefinedByRPMPackages
if SCR.RegisterAgent(
path(".firewall_service_metadata"),
term(:ag_ini, GetMetadataAgent(filefullpath))
)
)
Builtins.foreach(@known_metadata) do |metadata_feature, metadata_key|
definition = Convert.to_string(
SCR.Read(
Expand Down Expand Up @@ -517,7 +517,7 @@ def SetNeededPortsAndProtocols(service, store_definition)
if !SCR.RegisterAgent(
path(".firewall_service_definition"),
term(:ag_ini, term(:SysConfigFile, filefullpath))
)
)
log.error "Cannot register agent for #{filefullpath}"
return false
end
Expand Down
10 changes: 5 additions & 5 deletions library/network/src/modules/CWMFirewallInterfaces.rb
Expand Up @@ -335,7 +335,7 @@ def InitAllowedInterfaces(services)
service_status,
SuSEFirewall.special_all_interface_zone,
false
)
)
@allowed_interfaces = Convert.convert(
Builtins.union(@allowed_interfaces, interfaces_supported_by_any),
from: "list",
Expand Down Expand Up @@ -523,7 +523,7 @@ def InterfacesValidate(_widget, _key, _event)
"\n" \
"Continue?"
)
)
)
return false
end
end
Expand Down Expand Up @@ -556,7 +556,7 @@ def InterfacesValidate(_widget, _key, _event)
),
ifaces_list
)
)
)
return false
end
end
Expand All @@ -575,7 +575,7 @@ def InterfacesValidate(_widget, _key, _event)
),
ifaces_list
)
)
)
return false
end
end
Expand Down Expand Up @@ -629,7 +629,7 @@ def CheckPossbilityToChangeFirewall(new_status)
),
ifaces_list
)
)
)
# all known ifaces are buggy
if Builtins.size(@buggy_ifaces) == Builtins.size(all_ifaces)
return false
Expand Down
2 changes: 1 addition & 1 deletion library/network/src/modules/Internet.rb
Expand Up @@ -145,7 +145,7 @@ def Start(log)
if SCR.Execute(
path(".target.bash"),
Ops.add("/sbin/isdnctrl dial ", @device)
) != 0
) != 0
Builtins.y2error("isdnctrl failed")
return false
end
Expand Down
2 changes: 1 addition & 1 deletion library/network/src/modules/NetworkConfig.rb
Expand Up @@ -74,7 +74,7 @@ def ReadConfig(config)
if Builtins.regexpmatch(
comment,
Ops.add(Ops.add("^.*## Type:[ \t]*([", String.CLower), "]*).*$")
)
)
comment = Builtins.regexpsub(
comment,
Ops.add(Ops.add("^.*## Type:[ \t]*([", String.CLower), "]*).*$"),
Expand Down

0 comments on commit 13f22c0

Please sign in to comment.