global name 'FLAGS' is not defined

Bug #1022966 reported by Gary Kotton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Jiajun Liu

Bug Description

If the file policy.json is missing then the following error occurs:
quantumv2) net-create --tenant_id default net1
ERROR: cliff.app global name 'FLAGS' is not defined
(quantumv2)

The reason is the exception (the FLAGS is not defined)

def init():
    global _POLICY_PATH
    if not _POLICY_PATH:
        _POLICY_PATH = find_config_file({}, 'policy.json')
        if not _POLICY_PATH:
            raise exceptions.PolicyNotFound(path=FLAGS.policy_file)
    with open(_POLICY_PATH) as f:
        _set_brain(f.read())

Gary Kotton (garyk)
Changed in quantum:
importance: Undecided → Low
Jiajun Liu (ljjjustin)
Changed in quantum:
assignee: nobody → ljjjustin (ljjjustin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

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

Reviewed: https://review.openstack.org/9625
Committed: http://github.com/openstack/quantum/commit/2cb30561416a499673c8a32cf7700963ca772da7
Submitter: Jenkins
Branch: master

commit 2cb30561416a499673c8a32cf7700963ca772da7
Author: justin ljj <email address hidden>
Date: Wed Jul 11 13:38:26 2012 +0800

    Raise proper exception if policy file do not exist

    Fixes bug 1022966.

    Change-Id: Ia1f9a95eb9e956d0d65efb50e674de18d0552b6e

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
milestone: none → folsom-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-3 → 2012.2
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.