mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 13:49:49 +00:00
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>
This commit is contained in:
@@ -66,7 +66,7 @@ class LocalhostBEController(BuildEnvironmentController):
|
||||
err = "command: %s \n%s" % (command, out)
|
||||
else:
|
||||
err = "command: %s \n%s" % (command, err)
|
||||
logger.warn("localhostbecontroller: shellcmd error %s" % err)
|
||||
logger.warning("localhostbecontroller: shellcmd error %s" % err)
|
||||
raise ShellCmdException(err)
|
||||
else:
|
||||
logger.debug("localhostbecontroller: shellcmd success")
|
||||
|
||||
@@ -164,16 +164,16 @@ class Command(NoArgsCommand):
|
||||
try:
|
||||
self.cleanup()
|
||||
except Exception as e:
|
||||
logger.warn("runbuilds: cleanup exception %s" % str(e))
|
||||
logger.warning("runbuilds: cleanup exception %s" % str(e))
|
||||
|
||||
try:
|
||||
self.archive()
|
||||
except Exception as e:
|
||||
logger.warn("runbuilds: archive exception %s" % str(e))
|
||||
logger.warning("runbuilds: archive exception %s" % str(e))
|
||||
|
||||
try:
|
||||
self.schedule()
|
||||
except Exception as e:
|
||||
logger.warn("runbuilds: schedule exception %s" % str(e))
|
||||
logger.warning("runbuilds: schedule exception %s" % str(e))
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -133,7 +133,7 @@ def run_shell_cmd(command, cwd=None):
|
||||
err = "command: %s \n%s" % (command, out)
|
||||
else:
|
||||
err = "command: %s \n%s" % (command, err)
|
||||
config.logger.warn("_shellcmd: error \n%s\n%s", out, err)
|
||||
config.logger.warning("_shellcmd: error \n%s\n%s", out, err)
|
||||
raise ShellCmdException(err)
|
||||
else:
|
||||
#config.logger.debug("localhostbecontroller: shellcmd success\n%s" % out)
|
||||
|
||||
@@ -26,12 +26,12 @@ def validate_html5(url):
|
||||
warnings = int(resp['x-w3c-validator-warnings'])
|
||||
|
||||
if status == 'Invalid':
|
||||
config.logger.warn("Failed %s is %s\terrors %s warnings %s (check at %s)", url, status, errors, warnings, urlrequest)
|
||||
config.logger.warning("Failed %s is %s\terrors %s warnings %s (check at %s)", url, status, errors, warnings, urlrequest)
|
||||
else:
|
||||
config.logger.debug("OK! %s", url)
|
||||
|
||||
except Exception as exc:
|
||||
config.logger.warn("Failed validation call: %s", exc)
|
||||
config.logger.warning("Failed validation call: %s", exc)
|
||||
return (status, errors, warnings)
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ for t in os.walk(os.path.dirname(currentdir)):
|
||||
if not conflict:
|
||||
urlpatterns.insert(0, url(r'^' + modulename + '/', include ( modulename + '.urls')))
|
||||
else:
|
||||
logger.warn("Module \'%s\' has a regexp conflict, was not added to the urlpatterns" % modulename)
|
||||
logger.warning("Module \'%s\' has a regexp conflict, was not added to the urlpatterns" % modulename)
|
||||
|
||||
from pprint import pformat
|
||||
#logger.debug("urlpatterns list %s", pformat(urlpatterns))
|
||||
|
||||
Reference in New Issue
Block a user