Skip to content
Browse files

Prevent exception when trying to read an empty stderr of a process.

  • Loading branch information...
1 parent e85c1cc commit c641eaf87a62af83df53b97cd5d89ba851ccc167 Mirko Boehm committed Jun 6, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 buildcontrol/common/BuildScriptInterface.py
View
4 buildcontrol/common/BuildScriptInterface.py
@@ -53,12 +53,12 @@ def querySetting( self, setting ):
runner = RunCommand( cmd, 1800 )
runner.run()
if runner.getReturnCode() != 0:
- stderr = runner.getStdErr().decode()
+ stderr = ( runner.getStdErr() or '' ).decode()
raise MomError( 'Cannot query setting "{0}" for build script "{1}": {2}!'\
.format( setting, self.getBuildScript(), stderr ) )
output = runner.getStdOut()
if not output:
- stderr = runner.getStdErr().decode()
+ stderr = ( runner.getStdErr() or '' ).decode()
raise MomError( 'The build script "{0}" did not return a value! It said: {1}'
.format( self.getBuildScript(), stderr ) )
line = output.decode().strip()

0 comments on commit c641eaf

Please sign in to comment.
Something went wrong with that request. Please try again.