From 763f8d5c6603ae4b1d648e8407a6437ce238828f Mon Sep 17 00:00:00 2001
From: Josef Reidinger
Date: Thu, 6 Jan 2022 20:20:57 +0100
Subject: [PATCH 01/13] adapt rubocop config
---
.rubocop.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.rubocop.yml b/.rubocop.yml
index bfcd33da7..f2b0005a6 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,6 +1,6 @@
# use the shared Yast defaults
inherit_from:
- /usr/share/YaST2/data/devtools/data/rubocop-0.71.0_yast_style.yml
+ /usr/share/YaST2/data/devtools/data/rubocop-1.24.1_yast_style.yml
Metrics/AbcSize:
Max: 446
@@ -17,7 +17,7 @@ Metrics/ModuleLength:
Metrics/CyclomaticComplexity:
Max: 59
-Metrics/LineLength:
+Layout/LineLength:
Max: 274
Metrics/MethodLength:
From ded6ca4ca6733ae83559e3f88be3323362d98ab3 Mon Sep 17 00:00:00 2001
From: Josef Reidinger
Date: Thu, 6 Jan 2022 20:24:08 +0100
Subject: [PATCH 02/13] safe auto corrections
---
doc/examples/ask_resize_windows_partition.rb | 16 +-
doc/examples/popups2.rb | 78 ++---
.../src/clients/other_tools_warning.rb | 4 +-
.../commandline/src/modules/CommandLine.rb | 72 +++--
library/commandline/test/test_helper.rb | 2 +-
library/control/src/modules/InstError.rb | 12 +-
.../control/src/modules/InstExtensionImage.rb | 14 +-
library/control/src/modules/ProductControl.rb | 78 +++--
.../control/src/modules/WorkflowManager.rb | 62 ++--
library/control/test/test_helper.rb | 2 +-
library/control/test/workflow_manager_test.rb | 4 +-
library/cwm/examples/object_api_tree.rb | 1 +
library/cwm/src/lib/cwm/abstract_widget.rb | 3 +-
library/cwm/src/lib/cwm/pager.rb | 2 +-
library/cwm/src/lib/cwm/replace_point.rb | 2 +-
library/cwm/src/lib/cwm/ui_state.rb | 1 +
library/cwm/src/modules/CWM.rb | 38 +--
library/cwm/src/modules/CWMServiceStart.rb | 18 +-
library/cwm/src/modules/CWMTable.rb | 8 +-
library/cwm/src/modules/CWMTsigKeys.rb | 71 +++--
library/cwm/src/modules/DialogTree.rb | 6 +-
library/cwm/src/modules/TablePopup.rb | 28 +-
library/cwm/src/modules/WizardHW.rb | 12 +-
library/cwm/test/dialog_test.rb | 1 +
library/cwm/test/pager_test.rb | 1 +
library/cwm/test/test_helper.rb | 2 +-
library/cwm/test/tree_pager_test.rb | 1 +
library/desktop/src/clients/menu.rb | 44 +--
library/desktop/src/modules/Desktop.rb | 4 +-
library/desktop/test/test_helper.rb | 2 +-
library/general/example/popup_serie.rb | 2 +-
.../general/src/lib/cfa/conflict_report.rb | 4 +-
library/general/src/lib/cfa/sysctl_config.rb | 6 +-
.../autoinst_issues/missing_value.rb | 3 +-
library/general/src/lib/ui/greasemonkey.rb | 19 +-
.../general/src/lib/y2issues/invalid_value.rb | 2 +-
library/general/src/lib/yast2/popup.rb | 2 +-
library/general/src/modules/Distro.rb | 30 +-
library/general/src/modules/DontShowAgain.rb | 12 +-
library/general/src/modules/FileUtils.rb | 8 +-
library/general/src/modules/Hooks.rb | 2 +-
library/general/src/modules/Icon.rb | 4 +-
library/general/src/modules/Linuxrc.rb | 12 +-
library/general/src/modules/Message.rb | 4 +-
library/general/src/modules/Misc.rb | 4 +-
library/general/src/modules/OSRelease.rb | 2 +-
library/general/src/modules/Popup.rb | 14 +-
library/general/src/modules/Report.rb | 3 +-
library/general/src/modules/Summary.rb | 10 +-
library/general/src/modules/ValueBrowser.rb | 2 +-
library/general/test/asciifile_test.rb | 2 +-
.../autoinst_issues/invalid_value_test.rb | 2 +-
.../autoinst_issues/issues_presenter_test.rb | 3 +-
.../autoinst_issues/missing_value_test.rb | 2 +-
library/general/test/test_helper.rb | 2 +-
library/general/test/ui/greasemonkey_test.rb | 4 +-
library/general/test/ui/text_helpers_test.rb | 8 +-
.../test/ui/ui_extension_checker_test.rb | 2 +-
.../test/yast2/secret_attributes_test.rb | 2 +
library/gpg/src/modules/GPG.rb | 18 +-
library/gpg/src/modules/GPGWidgets.rb | 6 +-
library/gpg/test/test_helper.rb | 2 +-
library/log/src/modules/LogView.rb | 16 +-
.../network/src/lib/network/susefirewall.rb | 42 +--
.../network/src/lib/network/susefirewall2.rb | 18 +-
.../src/lib/network/susefirewall2services.rb | 8 +-
.../network/src/lib/network/susefirewalld.rb | 28 +-
.../src/modules/CWMFirewallInterfaces.rb | 61 ++--
library/network/src/modules/Internet.rb | 26 +-
.../network/src/modules/NetworkInterfaces.rb | 12 +-
library/network/src/modules/NetworkPopup.rb | 9 +-
library/network/src/modules/NetworkService.rb | 20 +-
library/network/src/modules/PortAliases.rb | 4 +-
library/network/src/modules/PortRanges.rb | 78 +++--
.../src/modules/SuSEFirewallProposal.rb | 22 +-
.../network/src/modules/firewalld_wrapper.rb | 8 +-
library/network/test/test_helper.rb | 2 +-
.../lib/packages/file_conflict_callbacks.rb | 6 +-
.../packages/src/lib/y2packager/license.rb | 2 +-
.../lib/y2packager/licenses_fetchers/base.rb | 2 +-
.../lib/y2packager/licenses_fetchers/rpm.rb | 3 -
.../y2packager/licenses_fetchers/tarball.rb | 3 -
.../packages/src/lib/y2packager/product.rb | 4 +-
.../y2packager/release_notes_fetchers/rpm.rb | 4 +-
.../y2packager/release_notes_fetchers/url.rb | 2 +-
.../packages/src/lib/y2packager/repository.rb | 2 +-
.../packages/src/lib/y2packager/resolvable.rb | 4 +-
.../packages/src/modules/PackageCallbacks.rb | 70 +++--
library/packages/src/modules/PackageKit.rb | 4 +-
library/packages/src/modules/PackageLock.rb | 12 +-
library/packages/src/modules/PackageSystem.rb | 28 +-
library/packages/src/modules/PackagesUI.rb | 62 ++--
.../src/modules/SignatureCheckCallbacks.rb | 20 +-
.../src/modules/SignatureCheckDialogs.rb | 206 ++++++-------
library/packages/src/modules/SlideShow.rb | 8 +-
library/packages/src/modules/Slides.rb | 4 +-
library/packages/test/dummy_callbacks_test.rb | 2 +-
library/packages/test/product_factory.rb | 10 +-
library/packages/test/test_helper.rb | 2 +-
.../y2packager/licenses_fetchers/rpm_test.rb | 2 +-
.../test/y2packager/product_reader_test.rb | 6 +-
.../packages/test/y2packager/product_test.rb | 32 +-
.../release_notes_fetchers/url_test.rb | 4 +-
library/sequencer/src/lib/ui/sequence.rb | 2 +-
library/sequencer/src/modules/Sequencer.rb | 4 +-
library/sequencer/test/test_helper.rb | 2 +-
.../src/lib/yast2/clients/view_anymsg.rb | 10 +-
library/system/src/lib/yast2/fs_snapshot.rb | 6 +-
library/system/src/modules/FileChanges.rb | 5 +-
library/system/src/modules/HwStatus.rb | 6 +-
library/system/src/modules/Initrd.rb | 30 +-
library/system/src/modules/Kernel.rb | 20 +-
library/system/test/fs_snapshot_test.rb | 10 +-
library/system/test/test_helper.rb | 2 +-
.../systemd/src/lib/yast2/service_widget.rb | 6 +-
library/systemd/src/modules/Service.rb | 10 +-
library/systemd/test/test_helper.rb | 2 +-
.../test/yast2/compound_service_test.rb | 2 +-
library/types/src/modules/Hostname.rb | 30 +-
library/types/src/modules/IP.rb | 16 +-
library/types/src/modules/Netmask.rb | 6 +-
library/types/src/modules/Punycode.rb | 8 +-
library/types/src/modules/String.rb | 6 +-
library/types/src/modules/URL.rb | 28 +-
library/types/test/test_helper.rb | 2 +-
library/types/test/url_test.rb | 48 +--
library/wizard/src/modules/Confirm.rb | 6 +-
library/wizard/src/modules/HTML.rb | 8 +-
library/wizard/src/modules/Progress.rb | 20 +-
library/wizard/src/modules/Wizard.rb | 8 +-
library/wizard/test/test_helper.rb | 2 +-
library/xml/src/modules/XML.rb | 5 +-
library/xml/test/test_helper.rb | 2 +-
library/xml/test/xml_test.rb | 274 +++++++++---------
134 files changed, 1073 insertions(+), 1158 deletions(-)
diff --git a/doc/examples/ask_resize_windows_partition.rb b/doc/examples/ask_resize_windows_partition.rb
index 31827da7b..c6c78ecc3 100644
--- a/doc/examples/ask_resize_windows_partition.rb
+++ b/doc/examples/ask_resize_windows_partition.rb
@@ -30,14 +30,14 @@ def main
Yast.import "Popup"
@long_text = "Resizing the windows partition works well in most cases,\n" \
- "but there are pathological cases where this might fail.\n" \
- "\n" \
- "You might lose all data on that disk. So please make sure\n" \
- "you have an up-to-date backup of all relevant data\n" \
- "for disaster recovery.\n" \
- "\n" \
- "If you are unsure, it might be a good idea to abort the installation\n" \
- "right now and make a backup."
+ "but there are pathological cases where this might fail.\n" \
+ "\n" \
+ "You might lose all data on that disk. So please make sure\n" \
+ "you have an up-to-date backup of all relevant data\n" \
+ "for disaster recovery.\n" \
+ "\n" \
+ "If you are unsure, it might be a good idea to abort the installation\n" \
+ "right now and make a backup."
@answer = Popup.YesNoHeadline("Resize Windows Partition?", @long_text)
diff --git a/doc/examples/popups2.rb b/doc/examples/popups2.rb
index dd1e91cd9..bee802eb7 100644
--- a/doc/examples/popups2.rb
+++ b/doc/examples/popups2.rb
@@ -55,32 +55,32 @@ def main
Popup.YesNoHeadline(
"Really delete world?",
"You in your infinite wisdom have chosen to delete this only world of ours.\n" \
- "This will mean the end to all of mankind and all life in the only known planet\n" \
- "known to be inhabited by intelligent or other life in the entire universe.\n" \
- "\n" \
- "Even though it is well known that mankind and human character are far from perfect,\n" \
- "we urgently request you to reconsider that decision.\n" \
- "\n" \
- "Are you absolutely sure you wish to delete this world?"
+ "This will mean the end to all of mankind and all life in the only known planet\n" \
+ "known to be inhabited by intelligent or other life in the entire universe.\n" \
+ "\n" \
+ "Even though it is well known that mankind and human character are far from perfect,\n" \
+ "we urgently request you to reconsider that decision.\n" \
+ "\n" \
+ "Are you absolutely sure you wish to delete this world?"
)
when :generic2
Popup.AnyQuestion(
"Great Dilemma",
"You must now decide how to save the world.\n" \
- "\n" \
- "\n" \
- "\n" \
- "If you make the wrong decision, creatures from outer space may choose\n" \
- "\n" \
- "to get rid of this planet of ours to make room for some interstellar\n" \
- "\n" \
- "hyper expressway.\n" \
- "\n" \
- "\n" \
- "\n" \
- "So: Do you fail to recognize that your inability to confront\n" \
- "\n" \
- "this kind of indecision may destroy all of mankind?",
+ "\n" \
+ "\n" \
+ "\n" \
+ "If you make the wrong decision, creatures from outer space may choose\n" \
+ "\n" \
+ "to get rid of this planet of ours to make room for some interstellar\n" \
+ "\n" \
+ "hyper expressway.\n" \
+ "\n" \
+ "\n" \
+ "\n" \
+ "So: Do you fail to recognize that your inability to confront\n" \
+ "\n" \
+ "this kind of indecision may destroy all of mankind?",
"&Everything you say",
"I'll &buy one of it",
:focus_no
@@ -89,20 +89,20 @@ def main
Popup.AnyQuestion3(
"Greatest Dilemma of the Millennium",
"You must now decide how to save the world.\n" \
- "\n" \
- "\n" \
- "\n" \
- "If you make the wrong decision, creatures from outer space may choose\n" \
- "\n" \
- "to get rid of this planet of ours to make room for some interstellar\n" \
- "\n" \
- "hyper expressway.\n" \
- "\n" \
- "\n" \
- "\n" \
- "So: Do you fail to recognize that your inability to confront\n" \
- "\n" \
- "this kind of indecision may destroy all of mankind?",
+ "\n" \
+ "\n" \
+ "\n" \
+ "If you make the wrong decision, creatures from outer space may choose\n" \
+ "\n" \
+ "to get rid of this planet of ours to make room for some interstellar\n" \
+ "\n" \
+ "hyper expressway.\n" \
+ "\n" \
+ "\n" \
+ "\n" \
+ "So: Do you fail to recognize that your inability to confront\n" \
+ "\n" \
+ "this kind of indecision may destroy all of mankind?",
"&Everything you say",
"I'll &buy one of it",
"But I don't have a &car",
@@ -113,10 +113,10 @@ def main
"Bad News",
RichText(
"Due to unforeseen circumstances it is necessary to format your hard disk.
\n" \
- "This may sound bad enough, but we must format your brain, too.
\n" \
- "And once this is done, you will fail to notice that in the process\n" \
- "the entire planet will undergo substantial rearranging of the continental shelves:\n" \
- "The continents will all be lowered to eight feet below sea level.
\n"
+ "This may sound bad enough, but we must format your brain, too.
\n" \
+ "And once this is done, you will fail to notice that in the process\n" \
+ "the entire planet will undergo substantial rearranging of the continental shelves:\n" \
+ "The continents will all be lowered to eight feet below sea level.
\n"
),
50, # width
10
diff --git a/library/commandline/src/clients/other_tools_warning.rb b/library/commandline/src/clients/other_tools_warning.rb
index 2dfceb836..4d0f4c961 100644
--- a/library/commandline/src/clients/other_tools_warning.rb
+++ b/library/commandline/src/clients/other_tools_warning.rb
@@ -40,8 +40,8 @@ def main
# Opscode Chef is a different way to configure the system.
message = _(
"Chef Client is running. The changes that you make\n" \
- "may be overridden by Chef later.\n" \
- "Continue configuration with YaST?"
+ "may be overridden by Chef later.\n" \
+ "Continue configuration with YaST?"
)
return Popup.ContinueCancel(message)
end
diff --git a/library/commandline/src/modules/CommandLine.rb b/library/commandline/src/modules/CommandLine.rb
index d7777483e..c5b071438 100644
--- a/library/commandline/src/modules/CommandLine.rb
+++ b/library/commandline/src/modules/CommandLine.rb
@@ -480,15 +480,15 @@ def Parse(arguments)
elsif opttype == "integer"
i = Builtins.tointeger(v)
ret = !i.nil?
- if ret != true
+ if ret == true
+ # update value of the option to integer
+ Ops.set(givenoptions, o, i)
+ else
# translators: error message, %2 is the value given
Print(
Builtins.sformat(_("Invalid value for option '%1': %2"), o, v)
)
@aborted = true if !@interactive
- else
- # update value of the option to integer
- Ops.set(givenoptions, o, i)
end
else
ret = (v == "") ? false : TypeRepository.is_a(v, opttype)
@@ -735,7 +735,21 @@ def PrintGeneralHelp
# translators: short help title for command line
Print(_("Basic Syntax:"))
- if !@interactive
+ if @interactive
+ # translators: module command line help
+ # translate and [options] only!
+ Print(_(" [options]"))
+ # translators: module command line help
+ # translate only!
+ Print(_(" help"))
+ # translators: module command line help
+ Print(" help")
+ Print(" longhelp")
+ Print(" xmlhelp")
+ Print("")
+ Print(" exit")
+ Print(" abort")
+ else
# translators: module command line help, %1 is the module name
Print(
Builtins.sformat(
@@ -779,20 +793,6 @@ def PrintGeneralHelp
Ops.get_string(@modulecommands, "id", "")
)
)
- else
- # translators: module command line help
- # translate and [options] only!
- Print(_(" [options]"))
- # translators: module command line help
- # translate only!
- Print(_(" help"))
- # translators: module command line help
- Print(" help")
- Print(" longhelp")
- Print(" xmlhelp")
- Print("")
- Print(" exit")
- Print(" abort")
end
Print("")
@@ -1247,13 +1247,13 @@ def Init(cmdlineinfo, args)
@commandcache = {}
@done = !@interactive
@aborted = false
- return @interactive
+ @interactive
else
# we cannot handle this on our own, return true if there is some command to be processed
# i.e, there is no parsing error
@done = Builtins.size(@commandcache) == 0
@aborted = @done
- return !@done
+ !@done
end
end
@@ -1324,7 +1324,7 @@ def Command
result = deep_copy(@commandcache)
@commandcache = {}
@done = !@interactive
- return deep_copy(result)
+ deep_copy(result)
# if in interactive mode, ask user for input
elsif @interactive
loop do
@@ -1348,11 +1348,11 @@ def Command
result = deep_copy(@commandcache)
@commandcache = {}
- return deep_copy(result)
+ deep_copy(result)
else
# there is no further commands left
@done = true
- return { "command" => "exit" }
+ { "command" => "exit" }
end
end
@@ -1590,20 +1590,16 @@ def Run(commandline)
options = Ops.get_map(m, "options", {})
# start initialization code if it wasn't already used
- if !initialized
- # check whether command is defined in the map (i.e. it is not predefined command or invalid command)
- # and start initialization if it's defined
- if Builtins.haskey(Ops.get_map(commandline, "actions", {}), command) &&
- Ops.get(commandline, "initialize")
- # non-GUI handling
- PrintVerbose(_("Initializing"))
- ret2 = commandline["initialize"].call
- if !ret2
- Builtins.y2milestone("Module initialization failed")
- return false
- else
- initialized = true
- end
+ if !initialized && (Builtins.haskey(Ops.get_map(commandline, "actions", {}), command) &&
+ Ops.get(commandline, "initialize"))
+ # non-GUI handling
+ PrintVerbose(_("Initializing"))
+ ret2 = commandline["initialize"].call
+ if ret2
+ initialized = true
+ else
+ Builtins.y2milestone("Module initialization failed")
+ return false
end
end
diff --git a/library/commandline/test/test_helper.rb b/library/commandline/test/test_helper.rb
index 08dc933d5..6affe9fe9 100644
--- a/library/commandline/test/test_helper.rb
+++ b/library/commandline/test/test_helper.rb
@@ -1 +1 @@
-require_relative "../../../test/test_helper.rb"
+require_relative "../../../test/test_helper"
diff --git a/library/control/src/modules/InstError.rb b/library/control/src/modules/InstError.rb
index 1e2d5cfb6..5a10d6b17 100644
--- a/library/control/src/modules/InstError.rb
+++ b/library/control/src/modules/InstError.rb
@@ -76,7 +76,10 @@ def SaveLogs
)
dialog_ret = nil
- if Ops.get_integer(cmd, "exit", -1) != 0
+ if Ops.get_integer(cmd, "exit", -1) == 0
+ Builtins.y2milestone("Logs have been saved to: %1", savelogsto)
+ dialog_ret = true
+ else
Builtins.y2error("Unable to save logs to %1", savelogsto)
Report.Error(
@@ -90,9 +93,6 @@ def SaveLogs
)
dialog_ret = false
- else
- Builtins.y2milestone("Logs have been saved to: %1", savelogsto)
- dialog_ret = true
end
UI.CloseDialog
@@ -146,8 +146,8 @@ def ShowErrorPopUp(heading, error_text, details)
# %3 - link to the Yast Bug Reporting HOWTO Web page
_(
"This is worth reporting a bug at %1.\n" \
- "Please, attach also all YaST logs stored in the '%2' directory.\n" \
- "See %3 for more information about YaST logs."
+ "Please, attach also all YaST logs stored in the '%2' directory.\n" \
+ "See %3 for more information about YaST logs."
),
bugzilla_url,
"/var/log/YaST2/",
diff --git a/library/control/src/modules/InstExtensionImage.rb b/library/control/src/modules/InstExtensionImage.rb
index 7295536d6..3520c73d8 100644
--- a/library/control/src/modules/InstExtensionImage.rb
+++ b/library/control/src/modules/InstExtensionImage.rb
@@ -377,11 +377,11 @@ def LoadExtension(package, message)
Builtins.y2milestone("Returned: %1", cmd_out)
ret = true
- if Ops.get_integer(cmd_out, "exit", -1) != 0
+ if Ops.get_integer(cmd_out, "exit", -1) == 0
+ @integrated_extensions = Builtins.add(@integrated_extensions, package)
+ else
Builtins.y2error("'extend' failed!")
ret = false
- else
- @integrated_extensions = Builtins.add(@integrated_extensions, package)
end
Popup.ClearFeedback if message != "" && !message.nil?
@@ -414,13 +414,13 @@ def UnLoadExtension(package, message)
Builtins.y2milestone("Returned: %1", cmd_out)
ret = true
- if Ops.get_integer(cmd_out, "exit", -1) != 0
- Builtins.y2error("'extend' failed!")
- ret = false
- else
+ if Ops.get_integer(cmd_out, "exit", -1) == 0
@integrated_extensions = Builtins.filter(@integrated_extensions) do |p|
p != package
end
+ else
+ Builtins.y2error("'extend' failed!")
+ ret = false
end
Popup.ClearFeedback if message != "" && !message.nil?
diff --git a/library/control/src/modules/ProductControl.rb b/library/control/src/modules/ProductControl.rb
index 58d260f3f..a4e812f06 100644
--- a/library/control/src/modules/ProductControl.rb
+++ b/library/control/src/modules/ProductControl.rb
@@ -761,7 +761,7 @@ def UnDisableAllModulesAndProposals(mode, stage)
one_workflow != this_workflow
end
- # Note: This might be done by a simple reverting with 'X = localX'
+ # NOTE: This might be done by a simple reverting with 'X = localX'
# but some of these modules don't need to be in a defined mode and stage
Builtins.foreach(getModules(stage, mode, :all)) do |m|
@@ -907,11 +907,11 @@ def AddWizardSteps(stagemode)
first_id = Ops.get_string(m, "id", "") if first_id == ""
if last_label != ""
- if last_domain != ""
+ if last_domain == ""
+ label = Builtins.dgettext(wizard_textdomain, last_label)
+ else
label = Builtins.dgettext(last_domain, last_label)
id = Ops.get_string(m, "id", "")
- else
- label = Builtins.dgettext(wizard_textdomain, last_label)
end
id = Ops.get_string(m, "id", "")
end
@@ -1082,23 +1082,23 @@ def getProposals(stage, mode, proptype)
proposal_name
)
# All proposal file names end with _proposal
- if !is_disabled
- final_proposals = if !Builtins.issubstring(proposal_name, "_proposal")
+ if is_disabled
+ Builtins.y2milestone(
+ "Proposal module %1 found among disabled subproposals",
+ proposal_name
+ )
+ else
+ final_proposals = if Builtins.issubstring(proposal_name, "_proposal")
Builtins.add(
final_proposals,
- [Ops.add(proposal_name, "_proposal"), order_value]
+ [proposal_name, order_value]
)
else
Builtins.add(
final_proposals,
- [proposal_name, order_value]
+ [Ops.add(proposal_name, "_proposal"), order_value]
)
end
- else
- Builtins.y2milestone(
- "Proposal module %1 found among disabled subproposals",
- proposal_name
- )
end
end
@@ -1276,18 +1276,14 @@ def RunFrom(from, allow_back)
retranslate = Ops.get_boolean(step, "retranslate", false)
# The very first dialog has back button disabled
- if Ops.less_or_equal(@current_step, minimum_step)
- # Don't mark back button disabled when back button status
- # is forced in the control file
- if !Builtins.haskey(step, "enable_back")
- Ops.set(step, "enable_back", "no")
- Builtins.y2milestone(
- "Disabling back: %1 %2 %3",
- @current_step,
- minimum_step,
- Ops.get(step, "enable_back")
- )
- end
+ if Ops.less_or_equal(@current_step, minimum_step) && !Builtins.haskey(step, "enable_back")
+ Ops.set(step, "enable_back", "no")
+ Builtins.y2milestone(
+ "Disabling back: %1 %2 %3",
+ @current_step,
+ minimum_step,
+ Ops.get(step, "enable_back")
+ )
end
do_continue = false
@@ -1327,14 +1323,12 @@ def RunFrom(from, allow_back)
@CurrentWizardStep = step_id
# Register what step we are going to run
- if !Stage.initial
- if !SCR.Write(
- path(".target.string"),
- Installation.current_step,
- step_id
- )
- Builtins.y2error("Error writing step identifier")
- end
+ if !Stage.initial && !SCR.Write(
+ path(".target.string"),
+ Installation.current_step,
+ step_id
+ )
+ Builtins.y2error("Error writing step identifier")
end
client_name = getClientName(step_name, step_execute)
@@ -1393,12 +1387,10 @@ def RunFrom(from, allow_back)
# Remove file if step was run and returned (without a crash);
if Ops.less_than(@current_step, Ops.subtract(Builtins.size(modules), 1)) &&
- !Stage.initial
- if !Convert.to_boolean(
+ !Stage.initial && !Convert.to_boolean(
SCR.Execute(path(".target.remove"), Installation.current_step)
)
- Builtins.y2error("Error removing step identifier")
- end
+ Builtins.y2error("Error removing step identifier")
end
if retranslate
@@ -1432,11 +1424,11 @@ def RunFrom(from, allow_back)
# %4 - directory where YaST logs are stored
# %5 - link to the Yast Bug Reporting HOWTO Web page
"Calling the YaST module %1 has failed.\n" \
- "More information can be found near the end of the '%2' file.\n" \
- "\n" \
- "This is worth reporting a bug at %3.\n" \
- "Please, attach also all YaST logs stored in the '%4' directory.\n" \
- "See %5 for more information about YaST logs.",
+ "More information can be found near the end of the '%2' file.\n" \
+ "\n" \
+ "This is worth reporting a bug at %3.\n" \
+ "Please, attach also all YaST logs stored in the '%4' directory.\n" \
+ "See %5 for more information about YaST logs.",
Builtins.symbolof(argterm),
"/var/log/YaST2/y2log",
"http://bugzilla.suse.com/",
@@ -1463,7 +1455,7 @@ def RunFrom(from, allow_back)
# The very first dialog must not exit with `back
# or `auto
if @current_step == 0 &&
- (result == :back || result == :auto && former_result == :back)
+ (result == :back || (result == :auto && former_result == :back))
Builtins.y2warning(
"Returned %1, Current step %2 (%3). The current step will be called again...",
result,
diff --git a/library/control/src/modules/WorkflowManager.rb b/library/control/src/modules/WorkflowManager.rb
index 493bec263..0e679c45c 100644
--- a/library/control/src/modules/WorkflowManager.rb
+++ b/library/control/src/modules/WorkflowManager.rb
@@ -380,8 +380,8 @@ def StoreWorkflowFile(file_from, file_to)
path(".target.bash_output"),
Builtins.sformat(
"\n" \
- "/bin/mkdir -p '%1';\n" \
- "/bin/cp -v '%2' '%3';\n",
+ "/bin/mkdir -p '%1';\n" \
+ "/bin/cp -v '%2' '%3';\n",
String.Quote(GetWorkflowDirectory()),
String.Quote(file_from),
String.Quote(file_to)
@@ -528,7 +528,7 @@ def GetCachedWorkflowFilename(type, src_id, name = "")
# A cached copy exists
if FileUtils.Exists(disk_filename)
Builtins.y2milestone("Using cached file %1", disk_filename)
- return disk_filename
+ disk_filename
# Trying to get the file from source
else
Builtins.y2milestone("File %1 not cached", disk_filename)
@@ -550,7 +550,7 @@ def GetCachedWorkflowFilename(type, src_id, name = "")
end
# File exists?
- return use_filename.nil? ? nil : StoreWorkflowFile(use_filename, disk_filename)
+ use_filename.nil? ? nil : StoreWorkflowFile(use_filename, disk_filename)
end
ensure
# release the media accessors (close server connections/unmount disks)
@@ -635,14 +635,12 @@ def RemoveWorkflow(type, src_id, name)
)
end
- if !Stage.initial
- if FileUtils.Exists(used_filename)
- Builtins.y2milestone(
- "Removing cached file '%1': %2",
- used_filename,
- SCR.Execute(path(".target.remove"), used_filename)
- )
- end
+ if !Stage.initial && FileUtils.Exists(used_filename)
+ Builtins.y2milestone(
+ "Removing cached file '%1': %2",
+ used_filename,
+ SCR.Execute(path(".target.remove"), used_filename)
+ )
end
end
@@ -665,9 +663,9 @@ def CleanWorkflowsDirectory
SCR.Execute(
path(".target.bash_ouptut"),
"\n" \
- "cd '%1';\n" \
- "/usr/bin/test -x /usr/bin/tar && /usr/bin/tar -zcf workflows_backup.tgz *.xml *.ycp *.rb;\n" \
- "/usr/bin/rm -rf *.xml *.ycp *.rb",
+ "cd '%1';\n" \
+ "/usr/bin/test -x /usr/bin/tar && /usr/bin/tar -zcf workflows_backup.tgz *.xml *.ycp *.rb;\n" \
+ "/usr/bin/rm -rf *.xml *.ycp *.rb",
String.Quote(directory)
)
)
@@ -690,9 +688,9 @@ def ReplaceProposalModule(proposal, old, new)
found = false
modules = Builtins.maplist(Ops.get_list(proposal, "proposal_modules", [])) do |m|
- if Ops.is_string?(m) && Convert.to_string(m) == old ||
- Ops.is_map?(m) &&
- Ops.get_string(Convert.to_map(m), "name", "") == old
+ if (Ops.is_string?(m) && Convert.to_string(m) == old) ||
+ (Ops.is_map?(m) &&
+ Ops.get_string(Convert.to_map(m), "name", "") == old)
found = true
next deep_copy(new) unless Ops.is_map?(m)
@@ -833,12 +831,12 @@ def UpdateProposals(proposals, prod_name, domain)
new_proposals = Builtins.add(new_proposals, p)
end
if !found
- if arch_all_prop != {}
+ if arch_all_prop == {}
+ Ops.set(proposal, "textdomain", domain)
+ else
Ops.set(arch_all_prop, "archs", arch)
proposal = MergeProposal(arch_all_prop, proposal, prod_name, domain)
# completly new proposal
- else
- Ops.set(proposal, "textdomain", domain)
end
new_proposals = Builtins.add(new_proposals, proposal)
@@ -983,11 +981,7 @@ def UpdateWorkflows(workflows, prod_name, domain)
new_workflows = Builtins.add(new_workflows, w)
end
if !found
- if arch_all_wf != {}
- Ops.set(arch_all_wf, ["defaults", "archs"], arch)
- workflow = MergeWorkflow(arch_all_wf, workflow, prod_name, domain)
- # completly new workflow
- else
+ if arch_all_wf == {}
# If modules has not been defined we are trying to use the appended modules
workflow["modules"] = workflow["append_modules"] unless workflow["modules"]
@@ -1001,6 +995,10 @@ def UpdateWorkflows(workflows, prod_name, domain)
deep_copy(mod)
end
)
+ else
+ Ops.set(arch_all_wf, ["defaults", "archs"], arch)
+ workflow = MergeWorkflow(arch_all_wf, workflow, prod_name, domain)
+ # completly new workflow
end
new_workflows = Builtins.add(new_workflows, workflow)
@@ -1108,7 +1106,12 @@ def AddNewProposals(proposals)
forbidden = Builtins.toset(forbidden)
Builtins.foreach(proposals) do |proposal|
- if !Builtins.contains(forbidden, Ops.get_string(proposal, "name", ""))
+ if Builtins.contains(forbidden, Ops.get_string(proposal, "name", ""))
+ Builtins.y2warning(
+ "Proposal '%1' already exists, not adding",
+ Ops.get_string(proposal, "name", "")
+ )
+ else
Builtins.y2milestone(
"Adding new proposal %1",
Ops.get_string(proposal, "name", "")
@@ -1117,11 +1120,6 @@ def AddNewProposals(proposals)
ProductControl.proposals,
proposal
)
- else
- Builtins.y2warning(
- "Proposal '%1' already exists, not adding",
- Ops.get_string(proposal, "name", "")
- )
end
end
diff --git a/library/control/test/test_helper.rb b/library/control/test/test_helper.rb
index 08dc933d5..6affe9fe9 100644
--- a/library/control/test/test_helper.rb
+++ b/library/control/test/test_helper.rb
@@ -1 +1 @@
-require_relative "../../../test/test_helper.rb"
+require_relative "../../../test/test_helper"
diff --git a/library/control/test/workflow_manager_test.rb b/library/control/test/workflow_manager_test.rb
index 185b49beb..5c62ab4df 100755
--- a/library/control/test/workflow_manager_test.rb
+++ b/library/control/test/workflow_manager_test.rb
@@ -299,7 +299,7 @@
let(:product_package) { "foo-release" }
let(:product) do
Y2Packager::Resolvable.new("kind" => :product, "name" => "foo", "source" => repo_id,
- "version" => "1.0", "arch" => "x86_64", "product_package" => product_package)
+ "version" => "1.0", "arch" => "x86_64", "product_package" => product_package)
end
let(:ext_package) { "foo-installation" }
let(:extension) do
@@ -308,7 +308,7 @@
end
let(:release) do
Y2Packager::Resolvable.new("name" => product_package, "source" => repo_id, "version" => "1.0", "arch" => "x86_64",
- "kind" => :package, "deps" => ["provides" => "installerextension(#{ext_package})"])
+ "kind" => :package, "deps" => ["provides" => "installerextension(#{ext_package})"])
end
before do
diff --git a/library/cwm/examples/object_api_tree.rb b/library/cwm/examples/object_api_tree.rb
index db8c3ea7a..5922c17d9 100644
--- a/library/cwm/examples/object_api_tree.rb
+++ b/library/cwm/examples/object_api_tree.rb
@@ -139,6 +139,7 @@ def true_love_selector
class ExampleTree < CWM::Tree
attr_reader :items
+
def initialize(items)
@items = items
end
diff --git a/library/cwm/src/lib/cwm/abstract_widget.rb b/library/cwm/src/lib/cwm/abstract_widget.rb
index 8383d30e4..ec9e9d277 100644
--- a/library/cwm/src/lib/cwm/abstract_widget.rb
+++ b/library/cwm/src/lib/cwm/abstract_widget.rb
@@ -62,14 +62,13 @@ class AbstractWidget
def handle_all_events
@handle_all_events.nil? ? false : @handle_all_events
end
- attr_writer :handle_all_events
+ attr_writer :handle_all_events, :widget_id
# @return [String] An ID, unique within a dialog, used for the widget.
# By default, the class name is used.
def widget_id
@widget_id || self.class.to_s
end
- attr_writer :widget_id
# Declare widget type for {Yast::CWMClass}.
# Your derived widgets will not need to do this.
diff --git a/library/cwm/src/lib/cwm/pager.rb b/library/cwm/src/lib/cwm/pager.rb
index 6bbc2fa9c..76aad8cd5 100644
--- a/library/cwm/src/lib/cwm/pager.rb
+++ b/library/cwm/src/lib/cwm/pager.rb
@@ -35,7 +35,7 @@ def handle(event)
return nil unless page
- # Note: don't rely on new_id being equal to page.widget_id
+ # NOTE: don't rely on new_id being equal to page.widget_id
# This may not be true for subclasses redefining #page_for_id
# (see bsc#1078212)
return nil if @current_page.widget_id == page.widget_id
diff --git a/library/cwm/src/lib/cwm/replace_point.rb b/library/cwm/src/lib/cwm/replace_point.rb
index 232428223..35929c659 100644
--- a/library/cwm/src/lib/cwm/replace_point.rb
+++ b/library/cwm/src/lib/cwm/replace_point.rb
@@ -12,7 +12,7 @@ class ReplacePoint < CustomWidget
# placeholder needed to be in dialog. Parameter type is limited by component
# system
# @param widget [CWM::AbstractWidget] initial widget in placeholder
- def initialize(id: "_placeholder", widget:)
+ def initialize(widget:, id: "_placeholder")
self.handle_all_events = true
self.widget_id = id
@widget = widget
diff --git a/library/cwm/src/lib/cwm/ui_state.rb b/library/cwm/src/lib/cwm/ui_state.rb
index e502e59e2..37f98be53 100644
--- a/library/cwm/src/lib/cwm/ui_state.rb
+++ b/library/cwm/src/lib/cwm/ui_state.rb
@@ -165,6 +165,7 @@ def find_tab(pages)
# Concrete tab within the current node to show in the next redraw
# @return [String, nil]
attr_reader :tab
+
# @see #tab
def tab=(tab)
@tab = tab
diff --git a/library/cwm/src/modules/CWM.rb b/library/cwm/src/modules/CWM.rb
index 34aa4fd01..89cb4545e 100644
--- a/library/cwm/src/modules/CWM.rb
+++ b/library/cwm/src/modules/CWM.rb
@@ -271,7 +271,7 @@ def GetLowestTimeout(widgets)
minimum = 0
Builtins.foreach(widgets) do |w|
timeout = Ops.get_integer(w, "ui_timeout", 0)
- if Ops.less_than(timeout, minimum) && Ops.greater_than(timeout, 0) ||
+ if (Ops.less_than(timeout, minimum) && Ops.greater_than(timeout, 0)) ||
minimum == 0
minimum = timeout
end
@@ -441,10 +441,10 @@ def ValidateMaps(widgets)
end
Builtins.foreach(to_check) do |key|
if key != "label" ||
- Ops.get(v, "widget") != :radio_buttons &&
+ (Ops.get(v, "widget") != :radio_buttons &&
Ops.get(v, "widget") != :custom &&
Ops.get(v, "widget") != :rich_text &&
- Ops.get(v, "widget") != :func
+ Ops.get(v, "widget") != :func)
ret = ValidateValueContents(key, Ops.get(v, key), k) && ret
end
end
@@ -488,10 +488,10 @@ def prepareWidget(widget_descr)
from: "any",
to: "term ()"
)
- if !toEval.nil?
- Ops.set(w, "widget", toEval.call)
- else
+ if toEval.nil?
Ops.set(w, "widget", VBox())
+ else
+ Ops.set(w, "widget", toEval.call)
end
else
id_term = Id(Ops.get_string(w, "_cwm_key", ""))
@@ -551,7 +551,7 @@ def prepareWidget(widget_descr)
)
when :intfield
min = Ops.get_integer(w, "minimum", 0)
- max = Ops.get_integer(w, "maximum", 2**31 - 1) # libyui support only signed int
+ max = Ops.get_integer(w, "maximum", (2**31) - 1) # libyui support only signed int
Ops.set(
w,
"widget",
@@ -796,7 +796,7 @@ def Run(widgets, functions, skip_store_for: [])
handleDebug if Ops.get_string(event_descr, "EventType", "") == "DebugEvent"
handle_ret = handleWidgets(widgets, event_descr)
if !handle_ret.nil? ||
- Ops.is_symbol?(ret) && Builtins.contains(save_exits, ret)
+ (Ops.is_symbol?(ret) && Builtins.contains(save_exits, ret))
save = true
if !handle_ret.nil?
ret = handle_ret
@@ -853,22 +853,22 @@ def AdjustButtons(next_, back, abort, _help)
next_ = "" if next_.nil?
back = "" if back.nil?
abort = "" if abort.nil?
- if next_ != ""
- Wizard.SetNextButton(:next, next_)
- else
+ if next_ == ""
Wizard.HideNextButton
+ else
+ Wizard.SetNextButton(:next, next_)
end
- if abort != ""
- Wizard.SetAbortButton(:abort, abort)
- else
+ if abort == ""
Wizard.HideAbortButton
+ else
+ Wizard.SetAbortButton(:abort, abort)
end
- if back != ""
- Wizard.SetBackButton(:back, back)
- else
+ if back == ""
Wizard.HideBackButton
+ else
+ Wizard.SetBackButton(:back, back)
end
nil
@@ -914,7 +914,7 @@ def show(contents, caption: nil, back_button: nil, next_button: nil, abort_butto
options = {
"contents" => widgets_contents(contents),
"widget_names" => widgets.map(&:widget_id),
- "widget_descr" => Hash[widgets.map { |w| [w.widget_id, w.cwm_definition] }]
+ "widget_descr" => widgets.map { |w| [w.widget_id, w.cwm_definition] }.to_h
}
options["caption"] = caption if caption
options["back_button"] = back_button if back_button
@@ -941,7 +941,7 @@ def ShowAndRun(settings)
settings["widget_names"] ||= []
settings["widget_names"] += widgets.map(&:widget_id)
settings["widget_descr"] ||= {}
- settings["widget_descr"] = Hash[widgets.map { |w| [w.widget_id, w.cwm_definition] }]
+ settings["widget_descr"] = widgets.map { |w| [w.widget_id, w.cwm_definition] }.to_h
end
widget_descr = Ops.get_map(settings, "widget_descr", {})
contents = Ops.get_term(settings, "contents", VBox())
diff --git a/library/cwm/src/modules/CWMServiceStart.rb b/library/cwm/src/modules/CWMServiceStart.rb
index c33c59287..f23ce2b7b 100644
--- a/library/cwm/src/modules/CWMServiceStart.rb
+++ b/library/cwm/src/modules/CWMServiceStart.rb
@@ -221,8 +221,8 @@ def AutoStartHelpTemplate
# (both without quotes)
_(
"Service Start
\n" \
- "To start the service every time your computer is booted, set\n" \
- "%1. Otherwise set %2.
"
+ "To start the service every time your computer is booted, set\n" \
+ "%1. Otherwise set %2.
"
)
end
@@ -237,9 +237,9 @@ def AutoStartHelpSocketTemplate
# (both without quotes)
_(
"Service Start
\n" \
- "To start the service every time your computer is booted, set\n" \
- "%1. To start the service via systemd socket activation, " \
- "set %3.\nOtherwise set %2.
"
+ "To start the service every time your computer is booted, set\n" \
+ "%1. To start the service via systemd socket activation, " \
+ "set %3.\nOtherwise set %2."
)
end
@@ -500,8 +500,8 @@ def StartStopHelpTemplate(restart_displayed)
# (both without quotes)
help = _(
"Switch On or Off
\n" \
- "To start or stop the service immediately, use \n" \
- "%1 or %2.
"
+ "To start or stop the service immediately, use \n" \
+ "%1 or %2."
)
if restart_displayed
# help text for service start widget 2/2, optional
@@ -721,8 +721,8 @@ def EnableLdapHelpTemplate
# %1 is button label, eg. "LDAP Support Active" (without quotes)
_(
"LDAP Support
\n" \
- "To store the settings in LDAP instead of native configuration files,\n" \
- "set %1.
"
+ "To store the settings in LDAP instead of native configuration files,\n" \
+ "set %1."
)
end
diff --git a/library/cwm/src/modules/CWMTable.rb b/library/cwm/src/modules/CWMTable.rb
index ec862c13b..2e7f677b9 100644
--- a/library/cwm/src/modules/CWMTable.rb
+++ b/library/cwm/src/modules/CWMTable.rb
@@ -209,12 +209,10 @@ def TableHandle(descr, key, event_descr)
index = counter if getItemId(t) == id
counter = Ops.add(counter, 1)
end
- if event_id == :_tw_table
- if Ops.get_string(event_descr, "EventReason", "") == "Activated" &&
+ if event_id == :_tw_table && (Ops.get_string(event_descr, "EventReason", "") == "Activated" &&
Ops.get_string(event_descr, "EventType", "") == "WidgetEvent" &&
- UI.WidgetExists(Id(:_tw_edit))
- event_id = :_tw_edit
- end
+ UI.WidgetExists(Id(:_tw_edit)))
+ event_id = :_tw_edit
end
case event_id
when :_tw_edit
diff --git a/library/cwm/src/modules/CWMTsigKeys.rb b/library/cwm/src/modules/CWMTsigKeys.rb
index a7774adbb..061609d70 100644
--- a/library/cwm/src/modules/CWMTsigKeys.rb
+++ b/library/cwm/src/modules/CWMTsigKeys.rb
@@ -300,8 +300,8 @@ def Handle(widget, _key, event)
# popup message
message = _(
"The selected TSIG key cannot be deleted,\n" \
- "because it is in use.\n" \
- "Stop using it in the configuration first."
+ "because it is in use.\n" \
+ "Stop using it in the configuration first."
)
# popup title
Popup.AnyMessage(_("Cannot delete TSIG key."), message)
@@ -366,14 +366,14 @@ def Handle(widget, _key, event)
# specified key exists
if Key2File(key2) != ""
# yes-no popup
- if !Popup.YesNo(
+ if Popup.YesNo(
_("The key with the specified ID exists and is used.\nRemove it?")
)
- return nil
- else
remove_file = Key2File(key2)
DeleteTSIGKeyFromDisk(remove_file)
RemoveTSIGKeyFile(remove_file)
+ else
+ return nil
end
end
# specified key is present on the disk, but not used
@@ -384,28 +384,25 @@ def Handle(widget, _key, event)
"/usr/bin/ls /etc/named.d/K%1\\.*",
Builtins.tolower(key2).shellescape
)
- )
- # yes-no popup
- if Popup.YesNo(
+ ) && Popup.YesNo(
_(
"A key with the specified ID was found\non your disk. Remove it?"
)
)
- SCR.Execute(
- path(".target.bash"),
- Builtins.sformat(
- "/usr/bin/rm -rf `/usr/bin/ls /etc/named.d/K%1\\.*`",
- Builtins.tolower(key2).shellescape
- )
- )
- files = Convert.convert(
- SCR.Read(path(".target.dir"), "/etc/named.d"),
- from: "any",
- to: "list "
+ SCR.Execute(
+ path(".target.bash"),
+ Builtins.sformat(
+ "/usr/bin/rm -rf `/usr/bin/ls /etc/named.d/K%1\\.*`",
+ Builtins.tolower(key2).shellescape
)
- Builtins.foreach(files) do |f|
- DeleteTSIGKeyFromDisk(f) if Builtins.contains(AnalyzeTSIGKeyFile(f), key2)
- end
+ )
+ files = Convert.convert(
+ SCR.Read(path(".target.dir"), "/etc/named.d"),
+ from: "any",
+ to: "list "
+ )
+ Builtins.foreach(files) do |f|
+ DeleteTSIGKeyFromDisk(f) if Builtins.contains(AnalyzeTSIGKeyFile(f), key2)
end
end
@@ -452,16 +449,16 @@ def Handle(widget, _key, event)
end
if Ops.greater_than(Builtins.size(coliding_files), 0)
# yes-no popup
- if !Popup.YesNo(
+ if Popup.YesNo(
_(
"The specified file contains a TSIG key with the same\n" \
- "identifier as some of already present keys.\n" \
- "Old keys will be removed. Continue?"
+ "identifier as some of already present keys.\n" \
+ "Old keys will be removed. Continue?"
)
)
- return nil
- else
Builtins.foreach(coliding_files) { |f| RemoveTSIGKeyFile(f) }
+ else
+ return nil
end
end
AddTSIGKeyFile(existing_filename)
@@ -562,24 +559,24 @@ def CreateWidget(settings)
# tsig keys management dialog help 2/4
_(
"Adding an Existing TSIG Key
\n" \
- "To add an already created TSIG key, select a Filename of the file\n" \
- "containing the key and click Add.
\n"
+ "To add an already created TSIG key, select a Filename of the file\n" \
+ "containing the key and click Add.\n"
) +
# tsig keys management dialog help 3/4
_(
"Creating a New TSIG Key
\n" \
- "To create a new TSIG key, set the Filename of the file in which to\n" \
- "create the key and the Key ID to identify the key then click\n" \
- "Generate.
\n"
+ "To create a new TSIG key, set the Filename of the file in which to\n" \
+ "create the key and the Key ID to identify the key then click\n" \
+ "Generate.\n"
) +
# tsig keys management dialog help 4/4
_(
"Removing a TSIG Key
\n" \
- "To remove a configured TSIG key, select it and click Delete.\n" \
- "All keys in the same file are deleted.\n" \
- "If a TSIG key is in use in the configuration\n" \
- "of the server, it cannot be deleted. The server must stop using it\n" \
- "in the configuration first.
\n"
+ "To remove a configured TSIG key, select it and click Delete.\n" \
+ "All keys in the same file are deleted.\n" \
+ "If a TSIG key is in use in the configuration\n" \
+ "of the server, it cannot be deleted. The server must stop using it\n" \
+ "in the configuration first.\n"
)
add_existing = VSquash(
diff --git a/library/cwm/src/modules/DialogTree.rb b/library/cwm/src/modules/DialogTree.rb
index 84e6dc140..eae3dbdcf 100644
--- a/library/cwm/src/modules/DialogTree.rb
+++ b/library/cwm/src/modules/DialogTree.rb
@@ -313,9 +313,7 @@ def ShowAndRun(settings)
to: "list