Skip to content

Commit

Permalink
Does not fetch extra hw attrs when the name is missing
Browse files Browse the repository at this point in the history
* It prevents some error message from appearing in the log.
  • Loading branch information
imobachgs committed Apr 2, 2020
1 parent 0d96838 commit 47937c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/y2network/hwinfo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def netcards
read_hardware
@netcards = ReadHardware("netcard").map do |attrs|
name = attrs["dev_name"]
extra_attrs = name ? extra_attrs_for(name) : {}
extra_attrs = name.to_s.empty? ? {} : extra_attrs_for(name)
Hwinfo.new(attrs.merge(extra_attrs))
end
end
Expand Down

0 comments on commit 47937c1

Please sign in to comment.