From 5d79148a2954879b7c378f171f6106d221060e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Wed, 21 Oct 2015 15:34:57 +0200 Subject: [PATCH] ProductLicense.rb - added nil check for the repository ID (to fix a crash in firstboot workflow with no repository defined) --- src/modules/ProductLicense.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/ProductLicense.rb b/src/modules/ProductLicense.rb index 061b7121e..56b9f797e 100644 --- a/src/modules/ProductLicense.rb +++ b/src/modules/ProductLicense.rb @@ -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( @@ -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