← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1177689] Re: variable referenced before assignment in vmwareapi code

 

** Changed in: nova/grizzly
       Status: Fix Committed => Fix Released

-- 
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/1177689

Title:
  variable referenced before assignment in vmwareapi code

Status in OpenStack Compute (Nova):
  Fix Released
Status in OpenStack Compute (nova) grizzly series:
  Fix Released

Bug description:
  nova/virt/vmwareapi/vm_utils.py

  557     for elem in data_stores:
  558         ds_name = None
  559         ds_type = None
  560         ds_cap = None
  561         ds_free = None
  562         for prop in elem.propSet:
  563             if prop.name == "summary.type":
  564                 ds_type = prop.val
  565             elif prop.name == "summary.name":
  566                 ds_name = prop.val
  567             elif prop.name == "summary.capacity":
  568                 ds_cap = prop.val
  569             elif prop.name == "summary.freeSpace":
  570                 ds_free = prop.val
  571         # Local storage identifier
  572         if ds_type == "VMFS" or ds_type == "NFS":
  573             data_store_name = ds_name
  574             return elem.obj, data_store_name, ds_cap, ds_free
  575 
  576     if data_store_name is None:
  577         raise exception.DatastoreNotFound()

  variable "data_store_name" referenced before assignment.

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