lib/snmp/open/file_reader.rb in snmp-open-0.6.0 vs lib/snmp/open/file_reader.rb in snmp-open-0.6.1
- old
+ new
@@ -30,15 +30,15 @@
def capture(cmd, oid, _options = {})
mkdir(@directory, cmd.to_s) if @make_directories
outfile = File.join(@directory, cmd.to_s, oid)
File.read(outfile)
- rescue Errno::ENOENT => err
+ rescue Errno::ENOENT => e
if @warnings
warning = @warnings.call(@command_generator, cmd, oid, outfile)
warn warning
end
- raise err
+ raise e
end
def mkdir(base, cmd)
Dir.mkdir(base) unless File.exist?(base)
Dir.mkdir(File.join(base, cmd)) unless File.exist?(File.join(base, cmd))