Skip to content

Commit

Permalink
command line mode is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Mar 18, 2014
1 parent 824dea9 commit b9ad185
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/clients/inst_scc.rb
Expand Up @@ -58,6 +58,7 @@ def main
SccApi::GlobalLogger.instance.log = Y2Logger.instance

@selected_addons = []

start_workflow
end

Expand All @@ -73,6 +74,8 @@ def register_base_system
ret = UI.UserInput

if ret == :next
return :next if ENV["TESTING"] == "1"

email = UI.QueryWidget(:email, :Value)
reg_code = UI.QueryWidget(:reg_code, :Value)
# reset the user input in case an exception is raised
Expand Down
27 changes: 22 additions & 5 deletions src/clients/scc.rb
Expand Up @@ -26,12 +26,29 @@
require "registration/sw_mgmt"

module Yast
import "Wizard"
class SccClient < Client
Yast.import "Wizard"
Yast.import "CommandLine"

Wizard.CreateDialog
::Registration::SwMgmt.init
def main
if WFM.Args == ["help"]
cmdline_description = {
"id" => "scc",
# Command line help text for the repository module, %1 is "SUSEconnect"
"help" => _("Use '%s' instead of this YaST module.") % "SUSEconnect",
}

WFM.call("inst_scc")
CommandLine.Run(cmdline_description)
else
Wizard.CreateDialog
::Registration::SwMgmt.init

Wizard.CloseDialog
WFM.call("inst_scc")

Wizard.CloseDialog
end
end
end
end

Yast::SccClient.new.main

0 comments on commit b9ad185

Please sign in to comment.