aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/bldcontrol/models.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-09 14:01:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-09 17:32:04 +0100
commit676a5f592e8507e81b8f748d58acfea7572f8796 (patch)
tree41868f24d5460326ed11e4a2d98c19be90fc127e /lib/toaster/bldcontrol/models.py
parentc5e45063cb3ae17bbe3304ea5e712bd76e686c4a (diff)
downloadbitbake-676a5f592e8507e81b8f748d58acfea7572f8796.tar.gz
bitbake: Update logger.warn() -> logger.warning()
python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/bldcontrol/models.py')
-rw-r--r--lib/toaster/bldcontrol/models.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/toaster/bldcontrol/models.py b/lib/toaster/bldcontrol/models.py
index cb49a58c4..e09ad20dc 100644
--- a/lib/toaster/bldcontrol/models.py
+++ b/lib/toaster/bldcontrol/models.py
@@ -98,11 +98,11 @@ class BuildRequest(models.Model):
# Check that the state we're trying to set is not going backwards
# e.g. from REQ_FAILED to REQ_INPROGRESS
if self.old_state != self.state and self.old_state > self.state:
- logger.warn("Invalid state change requested: "
- "Cannot go from %s to %s - ignoring request" %
- (BuildRequest.REQUEST_STATE[self.old_state][1],
- BuildRequest.REQUEST_STATE[self.state][1])
- )
+ logger.warning("Invalid state change requested: "
+ "Cannot go from %s to %s - ignoring request" %
+ (BuildRequest.REQUEST_STATE[self.old_state][1],
+ BuildRequest.REQUEST_STATE[self.state][1])
+ )
# Set property back to the old value
self.state = self.old_state
return