local variable referenced before assignment

Bug #1513372 reported by Kai Qiang Wu(Kennan)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Medium
Kai Qiang Wu(Kennan)

Bug Description

find following errors logs when tried magnum case (as magnum integrated with barbican)

2015-11-04 23:01:48.076 TRACE barbican.api.controllers Traceback (most recent call last):
2015-11-04 23:01:48.076 TRACE barbican.api.controllers File "/opt/stack/barbican/barbican/api/controllers/__init__.py", line 104, in handler
2015-11-04 23:01:48.076 TRACE barbican.api.controllers return fn(inst, *args, **kwargs)
2015-11-04 23:01:48.076 TRACE barbican.api.controllers File "/opt/stack/barbican/barbican/api/controllers/__init__.py", line 90, in enforcer
2015-11-04 23:01:48.076 TRACE barbican.api.controllers return fn(inst, *args, **kwargs)
2015-11-04 23:01:48.076 TRACE barbican.api.controllers File "/opt/stack/barbican/barbican/api/controllers/__init__.py", line 146, in content_types_enforcer
2015-11-04 23:01:48.076 TRACE barbican.api.controllers return fn(inst, *args, **kwargs)
2015-11-04 23:01:48.076 TRACE barbican.api.controllers File "/opt/stack/barbican/barbican/api/controllers/consumers.py", line 173, in on_delete
2015-11-04 23:01:48.076 TRACE barbican.api.controllers suppress_exception=True
2015-11-04 23:01:48.076 TRACE barbican.api.controllers File "/opt/stack/barbican/barbican/model/repositories.py", line 1262, in get_by_values
2015-11-04 23:01:48.076 TRACE barbican.api.controllers return consumer
2015-11-04 23:01:48.076 TRACE barbican.api.controllers UnboundLocalError: local variable 'consumer' referenced before assignment

Changed in barbican:
assignee: nobody → Kai Qiang Wu(Kennan) (wkqwu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

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

Changed in barbican:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/241921
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=5a4e4f8e423c5e689c5d580d24a92508e2325455
Submitter: Jenkins
Branch: master

commit 5a4e4f8e423c5e689c5d580d24a92508e2325455
Author: Kai Qiang Wu <email address hidden>
Date: Thu Nov 5 02:23:23 2015 -0600

    Make variable defined before refer

    It can happen cases for suppress_exception=true case.
    we need to define it before refer it.

    Change-Id: I7019df3689e35be27d7e7068d1a0a71659961f99
    Closes-Bug: #1513372

Changed in barbican:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/barbican 2.0.0.0b1

This issue was fixed in the openstack/barbican 2.0.0.0b1 development milestone.

Changed in barbican:
status: Fix Committed → Fix Released
Changed in barbican:
milestone: none → mitaka-1
importance: Undecided → Medium
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.