From 3fb7e33305f55875424ea8521b2ba2e3893b3793 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Wed, 28 Feb 2018 23:26:04 +0100 Subject: [PATCH] Bugfix: non-existent manifest not handled gracefully #639 --- cdist/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/__init__.py b/cdist/__init__.py index a8f6600f..370a1e04 100644 --- a/cdist/__init__.py +++ b/cdist/__init__.py @@ -97,7 +97,7 @@ class CdistEntityError(Error): def stderr(self): output = [] for stderr_name, stderr_path in self.stderr_paths: - if os.path.getsize(stderr_path) > 0: + if os.path.exists(stderr_path) and os.path.getsize(stderr_path) > 0: label_begin = '---- BEGIN ' + stderr_name + ':stderr ----' label_end = '---- END ' + stderr_name + ':stderr ----' output.append('\n' + label_begin)