Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit 2d140ae

Browse files
author
Joshua Reich
committed
eliminate dead-code
1 parent 0bd7024 commit 2d140ae

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pyretic/core/classifier.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ def _sequence_actions(a1, as2):
215215
while isinstance(a1, DerivedPolicy):
216216
a1 = a1.policy
217217
# TODO: be uniform about returning copied or modified objects.
218-
if a1 == drop:
219-
return {drop}
220-
elif a1 == Controller or isinstance(a1, CountBucket):
218+
if a1 == Controller or isinstance(a1, CountBucket):
221219
return {a1}
222220
elif a1 == identity:
223221
return as2
@@ -247,9 +245,7 @@ def _sequence_actions(a1, as2):
247245
def _cross_act(r1,act,r2):
248246
m = r1.match.intersect(_commute_test(act, r2.match))
249247
actions = _sequence_actions(act,r2.actions)
250-
if actions == {drop}:
251-
return Classifier([Rule(r1.match,actions)])
252-
elif m == drop:
248+
if m == drop:
253249
return None
254250
else:
255251
return Classifier([Rule(m,actions)])

0 commit comments

Comments
 (0)