Skip to content

Commit

Permalink
ProductLicense.rb - added nil check for the repository ID
Browse files Browse the repository at this point in the history
(to fix a crash in firstboot workflow with no repository defined)
  • Loading branch information
lslezak committed Oct 21, 2015
1 parent d117c0c commit 5d79148
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/modules/ProductLicense.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1145,12 +1145,13 @@ def AskLicenseAgreement(src_id, dir, patterns, action, enable_back, base_product

licenses_ref = arg_ref(licenses)

label = Pkg::SourceGeneralData(src_id)["name"]
title = _("License Agreement")

if !label.empty?
# %s is an extension name, e.g. "SUSE Linux Enterprise Software Development Kit"
title = _("%s License Agreement") % label
if src_id
label = Pkg::SourceGeneralData(src_id)["name"]
# TRANSLATORS: %s is an extension name
# e.g. "SUSE Linux Enterprise Software Development Kit"
title = _("%s License Agreement") % label unless label.empty?
end

DisplayLicenseDialogWithTitle(
Expand All @@ -1163,7 +1164,7 @@ def AskLicenseAgreement(src_id, dir, patterns, action, enable_back, base_product
)
licenses = licenses_ref.value

update_license_archive_location(src_id)
update_license_archive_location(src_id) if src_id

# Display info as a popup if exists
InstShowInfo.show_info_txt(@info_file) if @info_file != nil
Expand Down

0 comments on commit 5d79148

Please sign in to comment.