From 9ff8cbccc7ac45fbe5d5a2dabe42a66d6260f9f2 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Fri, 23 Jan 2015 16:56:41 +0100 Subject: [PATCH] Just added the situation an returncode was raised but no content is in stderr --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 12e60369e..82c294eb0 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,9 @@ def getoutput(cmd): p.wait() if p.returncode: # if not returncode == 0 print('WARNING: A problem occured while running {0} (code {1})\n'.format(cmd,p.returncode)) - print('{0}'.format(p.stderr.read())) + stderr_content = p.stderr.read() + if stderr_content: + print('{0}\n'.format(stderr_content)) return "" return p.stdout.read()