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

Commit 26b8fc1

Browse files
committed
bug fix: NameError when modify policies are returned
1 parent 4809457 commit 26b8fc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyretic/core/classifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __add__(self,c2):
107107
# Helper function for rshift: given a test b and an action p, return a test
108108
# b' such that p >> b == b' >> p.
109109
def _commute_test(self, act, pkts):
110-
from pyretic.core.language import drop, identity, Controller, CountBucket, DerivedPolicy
110+
from pyretic.core.language import modify, drop, identity, Controller, CountBucket, DerivedPolicy
111111
while isinstance(act, DerivedPolicy):
112112
act = act.policy
113113
if act == identity:
@@ -140,7 +140,7 @@ def _commute_test(self, act, pkts):
140140
# Helper function for rshift: sequentially compose actions. a1 must be a
141141
# single action. Returns a list of actions.
142142
def _sequence_actions(self, a1, as2):
143-
from pyretic.core.language import drop, identity, Controller, CountBucket, DerivedPolicy
143+
from pyretic.core.language import modify, drop, identity, Controller, CountBucket, DerivedPolicy
144144
while isinstance(a1, DerivedPolicy):
145145
a1 = a1.policy
146146
# TODO: be uniform about returning copied or modified objects.

0 commit comments

Comments
 (0)