more pep8
This commit is contained in:
parent
d3e72b4d87
commit
b3f66ea6fb
|
@ -249,7 +249,6 @@ class PushRuleRestServlet(RestServlet):
|
||||||
else:
|
else:
|
||||||
raise UnrecognizedRequestError()
|
raise UnrecognizedRequestError()
|
||||||
|
|
||||||
|
|
||||||
def on_OPTIONS(self, _):
|
def on_OPTIONS(self, _):
|
||||||
return 200, {}
|
return 200, {}
|
||||||
|
|
||||||
|
@ -259,6 +258,7 @@ def _add_empty_priority_class_arrays(d):
|
||||||
d[pc] = []
|
d[pc] = []
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|
||||||
def _instance_handle_from_conditions(conditions):
|
def _instance_handle_from_conditions(conditions):
|
||||||
"""
|
"""
|
||||||
Given a list of conditions, return the instance handle of the
|
Given a list of conditions, return the instance handle of the
|
||||||
|
@ -289,6 +289,7 @@ def _filter_ruleset_with_path(ruleset, path):
|
||||||
return r
|
return r
|
||||||
raise NotFoundError
|
raise NotFoundError
|
||||||
|
|
||||||
|
|
||||||
def _priority_class_to_template_name(pc):
|
def _priority_class_to_template_name(pc):
|
||||||
if pc > PushRuleRestServlet.PRIORITY_CLASS_MAP['override']:
|
if pc > PushRuleRestServlet.PRIORITY_CLASS_MAP['override']:
|
||||||
# per-device
|
# per-device
|
||||||
|
@ -297,6 +298,7 @@ def _priority_class_to_template_name(pc):
|
||||||
else:
|
else:
|
||||||
return PushRuleRestServlet.PRIORITY_CLASS_INVERSE_MAP[pc]
|
return PushRuleRestServlet.PRIORITY_CLASS_INVERSE_MAP[pc]
|
||||||
|
|
||||||
|
|
||||||
def _rule_to_template(rule):
|
def _rule_to_template(rule):
|
||||||
template_name = _priority_class_to_template_name(rule['priority_class'])
|
template_name = _priority_class_to_template_name(rule['priority_class'])
|
||||||
if template_name in ['override', 'underride']:
|
if template_name in ['override', 'underride']:
|
||||||
|
|
Loading…
Reference in New Issue