← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1431195] [NEW] Wrong usage of dict in nova/block_device.py

 

Public bug reported:

In the method named _validate of BlockDeviceDict class, there were
some codes like follows:

    def _validate(self, bdm_dict):                                       
        """Basic data format validations."""                             
        dict_fields = set(key for key, _ in bdm_dict.iteritems()) 

While, bdm_dict was kown as dict type.When we wanted to got its` keys, 
do like follows maybe better: 

        dict_fields = set(bdm_dict)

** Affects: nova
     Importance: Undecided
     Assignee: zhangjialong (zhangjl)
         Status: New


** Tags: dict nova

** Changed in: nova
     Assignee: (unassigned) => zhangjialong (zhangjl)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1431195

Title:
  Wrong usage of dict in nova/block_device.py

Status in OpenStack Compute (Nova):
  New

Bug description:
  In the method named _validate of BlockDeviceDict class, there were
  some codes like follows:

      def _validate(self, bdm_dict):                                       
          """Basic data format validations."""                             
          dict_fields = set(key for key, _ in bdm_dict.iteritems()) 

  While, bdm_dict was kown as dict type.When we wanted to got its` keys, 
  do like follows maybe better: 

          dict_fields = set(bdm_dict)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1431195/+subscriptions


Follow ups

References