Remove local variable named 'meh'

Commit 3c584084 introduce a routine where the return value of a
function is assigned to a local variable named 'meh' and then
immediately returned.
This is a poor programming style and an even poorer variable name
choice.

Change-Id: I4da66c99689a999a30f83390dfe3c79db646e431
This commit is contained in:
Salvatore Orlando 2016-03-18 10:10:24 -07:00
parent 2644c12155
commit d090087df2

View File

@ -36,8 +36,7 @@ def _count_resource(context, plugin, collection_name, tenant_id):
# and count in python, allowing older plugins to still be supported
try:
obj_count_getter = getattr(plugin, count_getter_name)
meh = obj_count_getter(context, filters={'tenant_id': [tenant_id]})
return meh
return obj_count_getter(context, filters={'tenant_id': [tenant_id]})
except (NotImplementedError, AttributeError):
obj_getter = getattr(plugin, "get_%s" % collection_name)
obj_list = obj_getter(context, filters={'tenant_id': [tenant_id]})