diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-09 14:01:12 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-11 10:34:30 +0100 |
commit | 654eadfa30624c62018665da618287b6cb5c7e3c (patch) | |
tree | ddca0b2edbf92abfd7e7f6e9cd9c3499d704ea45 /bitbake/lib/toaster/bldcontrol | |
parent | 5052bf92e40d8e0764a11e897f06d3d9c7c065e9 (diff) | |
download | poky-654eadfa30624c62018665da618287b6cb5c7e3c.tar.gz |
bitbake: 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.
(Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 2 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 6 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/models.py | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 7def1f3a17..7b2f126e98 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
@@ -66,7 +66,7 @@ class LocalhostBEController(BuildEnvironmentController): | |||
66 | err = "command: %s \n%s" % (command, out) | 66 | err = "command: %s \n%s" % (command, out) |
67 | else: | 67 | else: |
68 | err = "command: %s \n%s" % (command, err) | 68 | err = "command: %s \n%s" % (command, err) |
69 | logger.warn("localhostbecontroller: shellcmd error %s" % err) | 69 | logger.warning("localhostbecontroller: shellcmd error %s" % err) |
70 | raise ShellCmdException(err) | 70 | raise ShellCmdException(err) |
71 | else: | 71 | else: |
72 | logger.debug("localhostbecontroller: shellcmd success") | 72 | logger.debug("localhostbecontroller: shellcmd success") |
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index 27289be5fd..5532b9deb2 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |||
@@ -164,16 +164,16 @@ class Command(NoArgsCommand): | |||
164 | try: | 164 | try: |
165 | self.cleanup() | 165 | self.cleanup() |
166 | except Exception as e: | 166 | except Exception as e: |
167 | logger.warn("runbuilds: cleanup exception %s" % str(e)) | 167 | logger.warning("runbuilds: cleanup exception %s" % str(e)) |
168 | 168 | ||
169 | try: | 169 | try: |
170 | self.archive() | 170 | self.archive() |
171 | except Exception as e: | 171 | except Exception as e: |
172 | logger.warn("runbuilds: archive exception %s" % str(e)) | 172 | logger.warning("runbuilds: archive exception %s" % str(e)) |
173 | 173 | ||
174 | try: | 174 | try: |
175 | self.schedule() | 175 | self.schedule() |
176 | except Exception as e: | 176 | except Exception as e: |
177 | logger.warn("runbuilds: schedule exception %s" % str(e)) | 177 | logger.warning("runbuilds: schedule exception %s" % str(e)) |
178 | 178 | ||
179 | time.sleep(1) | 179 | time.sleep(1) |
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index cb49a58c45..e09ad20dc3 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py | |||
@@ -98,11 +98,11 @@ class BuildRequest(models.Model): | |||
98 | # Check that the state we're trying to set is not going backwards | 98 | # Check that the state we're trying to set is not going backwards |
99 | # e.g. from REQ_FAILED to REQ_INPROGRESS | 99 | # e.g. from REQ_FAILED to REQ_INPROGRESS |
100 | if self.old_state != self.state and self.old_state > self.state: | 100 | if self.old_state != self.state and self.old_state > self.state: |
101 | logger.warn("Invalid state change requested: " | 101 | logger.warning("Invalid state change requested: " |
102 | "Cannot go from %s to %s - ignoring request" % | 102 | "Cannot go from %s to %s - ignoring request" % |
103 | (BuildRequest.REQUEST_STATE[self.old_state][1], | 103 | (BuildRequest.REQUEST_STATE[self.old_state][1], |
104 | BuildRequest.REQUEST_STATE[self.state][1]) | 104 | BuildRequest.REQUEST_STATE[self.state][1]) |
105 | ) | 105 | ) |
106 | # Set property back to the old value | 106 | # Set property back to the old value |
107 | self.state = self.old_state | 107 | self.state = self.old_state |
108 | return | 108 | return |