Skip to content
Snippets Groups Projects
Commit 289a2498 authored by David Baker's avatar David Baker
Browse files

Unnecessary newlines.

parent 3cb5b73c
No related branches found
No related tags found
No related merge requests found
...@@ -295,7 +295,6 @@ def _add_empty_priority_class_arrays(d): ...@@ -295,7 +295,6 @@ 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
...@@ -326,7 +325,6 @@ def _filter_ruleset_with_path(ruleset, path): ...@@ -326,7 +325,6 @@ def _filter_ruleset_with_path(ruleset, path):
return r return r
raise NotFoundError raise NotFoundError
def _priority_class_from_spec(spec): def _priority_class_from_spec(spec):
if spec['template'] not in PushRuleRestServlet.PRIORITY_CLASS_MAP.keys(): if spec['template'] not in PushRuleRestServlet.PRIORITY_CLASS_MAP.keys():
raise InvalidRuleException("Unknown template: %s" % (spec['kind'])) raise InvalidRuleException("Unknown template: %s" % (spec['kind']))
...@@ -337,7 +335,6 @@ def _priority_class_from_spec(spec): ...@@ -337,7 +335,6 @@ def _priority_class_from_spec(spec):
return pc return pc
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
...@@ -346,7 +343,6 @@ def _priority_class_to_template_name(pc): ...@@ -346,7 +343,6 @@ 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']:
...@@ -363,7 +359,6 @@ def _rule_to_template(rule): ...@@ -363,7 +359,6 @@ def _rule_to_template(rule):
ret["pattern"] = thecond["pattern"] ret["pattern"] = thecond["pattern"]
return ret return ret
def _strip_device_condition(rule): def _strip_device_condition(rule):
for i,c in enumerate(rule['conditions']): for i,c in enumerate(rule['conditions']):
if c['kind'] == 'device': if c['kind'] == 'device':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment