The name 'action' is referenced before it is defined in xenapi_conn.py

Bug #820963 reported by Ed Leafe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Ed Leafe

Bug Description

The code in the wait_for_task() method of xenapi_conn.py tries to set the 'error' key in the 'action' dict if an error is encountered. But that name is only defined if an 'id' was passed in to the method initially; in cases where no id was passed, the following traceback is returned:

Traceback (most recent call last):
  File "/home/ed/openstack/xen-host-config/nova/utils.py", line 467, in _inner
    self.f(*self.args, **self.kw)
  File "/home/ed/openstack/xen-host-config/nova/virt/xenapi_conn.py", line 416, in _poll_task
    action["error"] = str(error_info)
UnboundLocalError: local variable 'action' referenced before assignment

Related branches

Ed Leafe (ed-leafe)
Changed in nova:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-4 → 2011.3
status: Fix Committed → Fix Released
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.