]> code.ossystems Code Review - openembedded-core.git/commitdiff
process.py: Avoid deprecation warning
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 14 Feb 2011 16:32:07 +0000 (16:32 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 14 Feb 2011 16:32:07 +0000 (16:32 +0000)
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>
bitbake/lib/bb/process.py

index 808cd60f9283124a63a3bb79d5d081cbebfc51d8..4150d80e066c6f5daef20bfd6e140d7396f4416d 100644 (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):