process.py: Avoid deprecation warning

bitbake/lib/bb/process.py:15: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-02-14 16:32:07 +00:00
parent ebe2a5d8d3
commit 6cb8fd6def
1 changed files with 4 additions and 4 deletions

View File

@ -10,9 +10,9 @@ def subprocess_setup():
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
class CmdError(RuntimeError):
def __init__(self, command, message=None):
def __init__(self, command, msg=None):
self.command = command
self.message = message
self.msg = msg
def __str__(self):
if not isinstance(self.command, basestring):
@ -21,8 +21,8 @@ class CmdError(RuntimeError):
cmd = self.command
msg = "Execution of '%s' failed" % cmd
if self.message:
msg += ': %s' % self.message
if self.msg:
msg += ': %s' % self.msg
return msg
class NotFoundError(CmdError):