From 53c00dc0745dbbccc94726fe3373325212e24ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kadl=C4=8D=C3=ADk?= Date: Mon, 29 May 2017 23:26:42 +0200 Subject: [PATCH] Allow stdout and stderr to be something else than file --- module_build_service/builder/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module_build_service/builder/utils.py b/module_build_service/builder/utils.py index 31633f13..6b2e163d 100644 --- a/module_build_service/builder/utils.py +++ b/module_build_service/builder/utils.py @@ -90,9 +90,9 @@ def execute_cmd(args, stdout=None, stderr=None, cwd=None): :raises RuntimeError: Raised when command exits with non-zero exit code. """ out_log_msg = "" - if stdout: + if stdout and hasattr(stdout, "name"): out_log_msg += ", stdout log: %s" % stdout.name - if stderr: + if stderr and hasattr(stderr, "name"): out_log_msg += ", stderr log: %s" % stderr.name log.info("Executing command: %s%s" % (args, out_log_msg))