diff options
author | ytti <saku@ytti.fi> | 2015-03-08 13:27:06 +0200 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2015-03-08 13:27:06 +0200 |
commit | dc9309935ff129d39be985efc78858aeb11e8496 (patch) | |
tree | ec88b8860036620352a046e956dbc616e1b9cf8d | |
parent | cb851fdc9bfdeae603f8c56fe5bc69838b01f420 (diff) | |
parent | 52d88fa83d7a97292428a744a9d67531b294fd8e (diff) |
Merge pull request #87 from brandt/return_nil_on_missing_output_file
Fix: Handle missing output file
-rw-r--r-- | lib/oxidized/output/file.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/oxidized/output/file.rb b/lib/oxidized/output/file.rb index 03c878a..38c9917 100644 --- a/lib/oxidized/output/file.rb +++ b/lib/oxidized/output/file.rb @@ -33,6 +33,7 @@ class OxidizedFile < Output IO.readlines File.join(cfg_dir, node) else path = Dir.glob File.join(cfg_dir, '**', node) # fetch node in all groups + return nil if path[0].nil? open(path[0], 'r').readlines end end |