Skip to content

Commit

Permalink
another fix for strange error in integration test with empty 'nt' key
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Apr 13, 2016
1 parent 78aec65 commit 982f1c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/bootloader/mbr_update.rb
Expand Up @@ -226,12 +226,12 @@ def partition_to_activate(loader_device)
if num == 0
partition = activatable_partitions(mbr_dev).first
# strange, no partitions on our mbr device, we probably won't boot
if partition.empty?
if !partition
log.warn "no non-swap partitions for mbr device #{mbr_dev}"
return {}
end
num = partition["nr"]
log.info "loader_device is disk device, so use its #{num} partition"
log.info "loader_device is disk device, so use its partition #{partition.inspect}"
num = partition["nr"] or return {}
end

if num > 4
Expand Down

0 comments on commit 982f1c2

Please sign in to comment.