Skip to content

Commit

Permalink
do not crash if there is no general section (BNC#866529)
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Mar 3, 2014
1 parent e507f52 commit 678700c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/clients/inst_autosetup.rb
Expand Up @@ -134,8 +134,9 @@ def main
AutoinstGeneral.Write

write_network = false
semiauto_network = Profile.current["general"]["semi-automatic"] &&
Profile.current["general"]["semi-automatic"].include?("networking")
general_section = Profile.current["general"] || {}
semiauto_network = general_section["semi-automatic"] &&
general_section["semi-automatic"].include?("networking")

if Profile.current["networking"] &&
( Profile.current["networking"]["setup_before_proposal"] ||
Expand Down Expand Up @@ -252,8 +253,8 @@ def main
Storage.SetTestsuite(false) # *urgs* again
end

semiauto_partitions = Profile.current["general"]["semi-automatic"] &&
Profile.current["general"]["semi-automatic"].include?("partitioning")
semiauto_partitions = general_section["semi-automatic"] &&
general_section["semi-automatic"].include?("partitioning")

if semiauto_partitions
Builtins.y2milestone("Partitioning manual setup")
Expand Down

0 comments on commit 678700c

Please sign in to comment.