Skip to content

Commit

Permalink
improve a code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Oct 27, 2021
1 parent 6fe4fbf commit 4f0df6e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib/registration/clients/scc_auto.rb
Expand Up @@ -205,18 +205,16 @@ def online_medium_config

selected_product = Yast::AutoinstFunctions.selected_product
log.info "selected product #{selected_product.inspect}"
ay_product = if selected_product.respond_to?(:name)
selected_product.name
end

if !ay_product
if !selected_product
# TRANSLATORS: error message, %s is the XML path, e.g. "software/products"
Yast::Report.Error(
_("Missing product specification in the %s section") % "software/products"
)
return false
end

ay_product = selected_product.name
control_product = products.find { |p| p.name == ay_product }

if !control_product
Expand Down

0 comments on commit 4f0df6e

Please sign in to comment.