Merge "Fix py34 error of indexing 'dict_keys' object"
This commit is contained in:
@@ -52,7 +52,7 @@ class CompositeRule(wtypes.UserType):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def valid_composite_rule(rules):
|
def valid_composite_rule(rules):
|
||||||
if isinstance(rules, dict) and len(rules) == 1:
|
if isinstance(rules, dict) and len(rules) == 1:
|
||||||
and_or_key = rules.keys()[0]
|
and_or_key = list(rules)[0]
|
||||||
if and_or_key not in ('and', 'or'):
|
if and_or_key not in ('and', 'or'):
|
||||||
raise base.ClientSideError(
|
raise base.ClientSideError(
|
||||||
_('Threshold rules should be combined with "and" or "or"'))
|
_('Threshold rules should be combined with "and" or "or"'))
|
||||||
|
|||||||
Reference in New Issue
Block a user