[omd-commits] OMD Git: omd: tests: only unlink tmp file if it exists

git version control git at mathias-kettner.de
Mon Sep 8 21:49:17 CEST 2014


Module:   omd
Branch:   master
Commit:   e313473b6dc38d04c1854804313e5a5da216a989
URL:      http://omdistro.org/projects/omd/repository/revisions/e313473b6dc38d04c1854804313e5a5da216a989

Author:   Sven Nierlein <Sven.Nierlein at consol.de>
Date:     Mon Sep  8 21:46:52 2014 +0200
Commiter: Sven Nierlein <Sven.Nierlein at consol.de>
Date:     Mon Sep  8 21:46:52 2014 +0200

tests: only unlink tmp file if it exists

---

 t/TestUtils.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/TestUtils.pm b/t/TestUtils.pm
index 0da5f3c..6206ce9 100644
--- a/t/TestUtils.pm
+++ b/t/TestUtils.pm
@@ -861,7 +861,7 @@ sub restart_system_apache {
 
 END {
     our($cookie_file);
-    unlink($cookie_file);
+    unlink($cookie_file) if $cookie_file;
     if(defined $omd_symlink_created and $omd_symlink_created == 1) {
         unlink('/omd');
     }



More information about the omd-commits mailing list