From 29fa88f6956e52470f26bda57a2af2edbdb6a15b Mon Sep 17 00:00:00 2001 From: Gui Chen Date: Mon, 7 Jan 2013 15:34:00 +0800 Subject: [PATCH] verify if logfile is a file Signed-off-by: Gui Chen --- mic/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mic/bootstrap.py b/mic/bootstrap.py index 6f00d66..7225fe8 100644 --- a/mic/bootstrap.py +++ b/mic/bootstrap.py @@ -260,7 +260,7 @@ class Bootstrap(object): except (OSError, IOError), err: raise RuntimeError(err) finally: - if self.logfile: + if self.logfile and os.path.isfile(self.logfile): msger.log(file(self.logfile).read()) cleanup_chrootenv(rootdir, bindmounts, gloablmounts) proxy.unset_proxy_environ() -- 2.7.4