Fixing potential NameErrors

Fixing a couple locations that could potentially raise NameErrors
instead of intended exceptions.  These were found by looking at
flake8 F821 (undefined name) errors.

Added in unit tests to verify NameErrors would not be raised.

Change-Id: I8619cb0be495b814335a5aea23daca025484d3c6
This commit is contained in:
Morgan Fainberg 2013-08-18 22:17:21 -07:00
parent f64324fcd7
commit e138ae472b

View File

@ -108,7 +108,7 @@ def find_resource(manager, name_or_id):
msg = ("Multiple %s matches found for '%s', use an ID to be more"
" specific." % (manager.resource_class.__name__.lower(),
name_or_id))
raise exc.CommandError(msg)
raise exceptions.CommandError(msg)
def unauthenticated(f):