LOG.warn(msg, xxx) can't be found by pep8 check
Bug #1412727 reported by
jichenjc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
jichenjc |
Bug Description
nova had check for LOG.warn becaues of p3
compatible issue , but it didn't include the check for
the LOG.warn(msg, xxx) format
so the following violation can't be found
msg = _('abc')
LOG.warn(msg, xxx)
Changed in nova: | |
assignee: | nobody → jichenjc (jichenjc) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-3 → 2015.1.0 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/145506 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=71f2c334ec0 501cb987de74d4e 9ace9437f7726c
Committed: https:/
Submitter: Jenkins
Branch: master
commit 71f2c334ec0501c b987de74d4e9ace 9437f7726c
Author: jichenjc <email address hidden>
Date: Tue Jan 27 06:28:41 2015 +0800
Add _LW for missing translations
nova has following log method warn(err_ str % exc) .)*LOG\ .(warn) \(.*")
err_str = _LW("xxxxx")
LOG.
so if _LW is not added, current hacking will not find
it. However , if we change the re from current to
r"(
it will be generic. So this patch only fix existing
occurances and leave the hacking alone.
The pep8 check only checks format LOG.warning but
it didn't check logger.warning, and nova need to translate
the warning messages.
8510d3aaeeb 18bdbe333d2d5d4 c335f3732c4848 removed N331
checking so we don't need to consider warn or warning
Closes-Bug: #1412727
Change-Id: I8834e3b397b947 cb47307f1fe0f96 ef4fe22b173