Skip to content

Commit

Permalink
Handle NXIO for sysfs reads
Browse files Browse the repository at this point in the history
  • Loading branch information
ryukoposting committed Feb 22, 2024
1 parent ca850a0 commit fa09125
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ GEM
ruby2_keywords (>= 0.0.5)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
open3 (0.1.2)
parallel (1.24.0)
parser (3.3.0.5)
Expand All @@ -22,6 +24,9 @@ GEM
rack (>= 3.0.0, < 4)
rack-session (2.0.0)
rack (>= 3.0.0)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.9.0)
Expand Down Expand Up @@ -49,14 +54,17 @@ GEM
tilt (~> 2.0)
tilt (2.3.0)
unicode-display_width (2.5.0)
webrick (1.8.1)

PLATFORMS
x86_64-linux

DEPENDENCIES
minitest (~> 5.21.2)
mocha (~> 2.1.0)
nokogiri (~> 1.16.2)
open3
rackup (~> 2.1.0)
rake (~> 13.0.0)
rubocop (~> 1.60)
sinatra (~> 4.0.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/sensething/sysfs/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize(path)

def read
File.read(path)
rescue Errno::ENODATA
rescue Errno::ENODATA, Errno::ENXIO
nil
end

Expand Down

0 comments on commit fa09125

Please sign in to comment.