summaryrefslogtreecommitdiffstats
path: root/NPTest.pm
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2014-01-26 04:49:32 -0500
committerThomas Guyot-Sionnest <dermoth@aei.ca>2014-01-26 04:49:32 -0500
commit754cd092aea7d0f45f02c4fa695c827f7e81c5b2 (patch)
treefe2ff652ee8f17e9931461f46e681e87634d639e /NPTest.pm
parent68fe713335183dd37ced78821711c2a3f1ea2cc7 (diff)
downloadmonitoring-plugins-754cd092aea7d0f45f02c4fa695c827f7e81c5b2.tar.gz
Fix tests with an empty NPTest.cache file
The NPTest.cache cannot be loaded when empty, and this prevents getting the data and populating the file. This patch skips the file when empty as if it didn't exist.
Diffstat (limited to 'NPTest.pm')
-rw-r--r--NPTest.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/NPTest.pm b/NPTest.pm
index b00a7086..3d6e3a28 100644
--- a/NPTest.pm
+++ b/NPTest.pm
@@ -438,7 +438,7 @@ sub LoadCache
438 438
439 chomp($fileContents); 439 chomp($fileContents);
440 my( $contentsRef ) = eval $fileContents; 440 my( $contentsRef ) = eval $fileContents;
441 %CACHE = %{$contentsRef}; 441 %CACHE = %{$contentsRef} if (defined($contentsRef));
442 442
443 } 443 }
444 444