Showing 806 of 967 total issues
Method AddService
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def AddService(service, protocol, interface)
Builtins.y2milestone(
"Adding service %1, protocol %2 to %3",
service,
protocol,
Method RemoveService
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def RemoveService(service, protocol, interface)
Builtins.y2milestone(
"Removing service %1, protocol %2 from %3",
service,
protocol,
Method GPGKeyAsTerm
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def GPGKeyAsTerm(key)
key = deep_copy(key)
rt = Ops.add(
# GPG key property
Builtins.sformat(
Method SourceProbeError
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def SourceProbeError(url, error, description)
Builtins.y2milestone(
"Source probe: error: url: %1, error: %2, description: %3",
URL.HidePassword(url),
error,
Method SetServicesForZones
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def SetServicesForZones(services_ids, firewall_zones, new_status)
Yast.import "SuSEFirewallServices"
services_ids = deep_copy(services_ids)
zones = deep_copy(firewall_zones)
Method UseCorruptedItem
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def UseCorruptedItem(item_type, item_name, key, repository)
key = deep_copy(key)
repo = Pkg.SourceGeneralData(repository)
description_text = Builtins.sformat(
Method MergeWorkflow
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def MergeWorkflow(base, addon, _prod_name, domain)
base = deep_copy(base)
addon = deep_copy(addon)
log.info "merging workflow #{addon.inspect} to #{base.inspect}"
Method SaveInstallInf
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def SaveInstallInf(root)
if Stage.initial && !Mode.test
inst_if_file = "/etc/install.inf"
if !root.nil? && root != "" && root != "/"
Method Rich2Plain
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def Rich2Plain(richtext)
Builtins.y2debug("richtext=%1", richtext)
lparts = Builtins.splitstring(DropWS(richtext), "<")
Builtins.y2debug("lparts=%1", lparts)
Method RemovePortFromPortRanges
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def RemovePortFromPortRanges(port_number, port_ranges)
port_ranges = deep_copy(port_ranges)
# Checking necessarity of filtering and params
return deep_copy(port_ranges) if port_ranges.nil? || port_ranges == []
return deep_copy(port_ranges) if port_number.nil? || port_number == 0
Method initialize
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize
super
textdomain "base"
Method SourceCreateError
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def SourceCreateError(url, error, description)
Builtins.y2milestone(
"Source create: error: url: %1, error: %2, description: %3",
URL.HidePassword(url),
error,
Method GPGKeyAsString
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def GPGKeyAsString(key)
key = deep_copy(key)
# Part of the GnuPG key description in popup, %1 is a GnuPG key ID
Ops.add(
Ops.add(
Method UpdateWorkflows
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def UpdateWorkflows(workflows, prod_name, domain)
workflows = deep_copy(workflows)
Builtins.foreach(workflows) do |workflow|
stage = Ops.get_string(workflow, "stage", "")
mode = Ops.get_string(workflow, "mode", "")
Method ReadControlFile
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ReadControlFile(controlfile)
begin
@productControl = XML.XMLToYCPFile(controlfile)
rescue RuntimeError => e
log.error "Failed to read control file: #{e.inspect}"
Method popupLayoutInternalTypeWithLabel
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def popupLayoutInternalTypeWithLabel(headline, message, button_box, label, richtext, width, height)
button_box = deep_copy(button_box)
rt = VWeight(
1,
VBox(
Method AddModule
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def AddModule(modname, modargs)
log.warn "Initrd.AddModule() is deprecated, do not use (sysconfig.kernel.INITRD_MODULES " \
"is not written anymore, see bnc#895084)"
if Stage.initial && Builtins.size(@modules) == 0
Method SourceReportError
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def SourceReportError(source_id, url, error, description)
Builtins.y2milestone(
"Source report: error: id: %1, url: %2, error: %3, description: %4",
source_id,
URL.HidePassword(url),
Method ProgressStart
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ProgressStart(id, task, in_percent, is_alive, _min, _max, _val_raw, val_percent)
Builtins.y2milestone("ProgressStart: %1", id)
@tick_progress = is_alive
@val_progress = !in_percent && !is_alive
Method main
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def main
Yast.import "UI"
textdomain "base"
Yast.import "XML"