Fix v1 hybrid storage python2 python3 string type comparison in memory
Comparing res_type_info['qty_metric'] against six.string_types instead of six.text_type for python2 python3 compatibility Change-Id: I1fc4959ff7b64210a2d47ec77dc2780b320fc355 Signed-off-by: yuanrunsen <yuanrunsen@unitedstack.com>
This commit is contained in:
parent
d78ba8740e
commit
f044c03fb1
@ -400,7 +400,7 @@ class GnocchiStorage(BaseHybridBackend):
|
|||||||
price_dict = {'price': float(price)}
|
price_dict = {'price': float(price)}
|
||||||
|
|
||||||
# Getting vol
|
# Getting vol
|
||||||
if isinstance(res_type_info['qty_metric'], six.text_type):
|
if isinstance(res_type_info['qty_metric'], six.string_types):
|
||||||
try:
|
try:
|
||||||
qty = self._conn.metric.get_measures(
|
qty = self._conn.metric.get_measures(
|
||||||
resource['metrics'][res_type_info['qty_metric']],
|
resource['metrics'][res_type_info['qty_metric']],
|
||||||
|
Loading…
Reference in New Issue
Block a user