Skip to content
This repository
Browse code

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

  • Loading branch information...
commit c641eaf87a62af83df53b97cd5d89ba851ccc167 1 parent e85c1cc
Mirko Boehm authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 buildcontrol/common/BuildScriptInterface.py
4 buildcontrol/common/BuildScriptInterface.py
@@ -53,12 +53,12 @@ def querySetting( self, setting ):
53 53 runner = RunCommand( cmd, 1800 )
54 54 runner.run()
55 55 if runner.getReturnCode() != 0:
56   - stderr = runner.getStdErr().decode()
  56 + stderr = ( runner.getStdErr() or '' ).decode()
57 57 raise MomError( 'Cannot query setting "{0}" for build script "{1}": {2}!'\
58 58 .format( setting, self.getBuildScript(), stderr ) )
59 59 output = runner.getStdOut()
60 60 if not output:
61   - stderr = runner.getStdErr().decode()
  61 + stderr = ( runner.getStdErr() or '' ).decode()
62 62 raise MomError( 'The build script "{0}" did not return a value! It said: {1}'
63 63 .format( self.getBuildScript(), stderr ) )
64 64 line = output.decode().strip()

0 comments on commit c641eaf

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