ml2: superfluous %s in LOG.debug() format

Bug #1404782 reported by Angus Lees
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Angus Lees

Bug Description

ml2.db.get_dynamic_segment() includes this line:

   LOG.debug("No dynamic segment %s found for "
      "Network:%(network_id)s, "
      "Physical network:%(physnet)s, "
      "segmentation_id:%(segmentation_id)s",
      {'network_id': network_id,
       'physnet': physical_network,
       'segmentation_id': segmentation_id})

Note the superfluous %s in the format string. At run-time, %s prints
the args hash again and doesn't cause an error, but this is clearly
unintended.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143352

Changed in neutron:
assignee: nobody → Angus Lees (gus)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/143352
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e3492286ca247c2f910d073044dd2b9c5387d150
Submitter: Jenkins
Branch: master

commit e3492286ca247c2f910d073044dd2b9c5387d150
Author: Angus Lees <email address hidden>
Date: Mon Dec 22 14:52:42 2014 +1100

    ml2: remove superfluous %s in LOG.debug() format

    ml2.db.get_dynamic_segment() includes this line:

       LOG.debug("No dynamic segment %s found for "
          "Network:%(network_id)s, "
          "Physical network:%(physnet)s, "
          "segmentation_id:%(segmentation_id)s",
          {'network_id': network_id,
           'physnet': physical_network,
           'segmentation_id': segmentation_id})

    Note the superfluous %s in the format string. At run-time, %s prints
    the args hash again and doesn't cause an error, but this is clearly
    unintended.

    Since there doesn't seem to be any value that was meant to be used
    instead, this change simply removes the %s.

    Change-Id: I414c7b4497f59927d8b6ec5f057dca19aa4ef122
    Closes-Bug: #1404782

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-2 → 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.