LOG.warn(msg, xxx) can't be found by pep8 check

Bug #1412727 reported by jichenjc
8
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)

jichenjc (jichenjc)
Changed in nova:
assignee: nobody → jichenjc (jichenjc)
Changed in nova:
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/145506
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=71f2c334ec0501cb987de74d4e9ace9437f7726c
Submitter: Jenkins
Branch: master

commit 71f2c334ec0501cb987de74d4e9ace9437f7726c
Author: jichenjc <email address hidden>
Date: Tue Jan 27 06:28:41 2015 +0800

    Add _LW for missing translations

    nova has following log method
    err_str = _LW("xxxxx")
    LOG.warn(err_str % exc)
    so if _LW is not added, current hacking will not find
    it. However , if we change the re from current to
    r"(.)*LOG\.(warn)\(.*")
    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.

    8510d3aaeeb18bdbe333d2d5d4c335f3732c4848 removed N331
    checking so we don't need to consider warn or warning

    Closes-Bug: #1412727

    Change-Id: I8834e3b397b947cb47307f1fe0f96ef4fe22b173

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.