More logic updates from Contract.

pull/145/head
jMyles 2017-12-14 20:34:30 -08:00
parent ef4cf13dc6
commit 5d70de739d
1 changed files with 4 additions and 1 deletions

View File

@ -267,7 +267,10 @@ class Policy(object):
def enact(self, networky_stuff):
for kfrag in self.kfrags:
contract = self._active_contracts[kfrag]
try:
contract = self._active_contracts[kfrag]
except KeyError:
raise KeyError("This contract isn't marked as active. Can't enact it.")
policy_payload = contract.encrypt_payload_for_ursula()
full_payload = self.alice.seal + msgpack.dumps(policy_payload)
response = networky_stuff.enact_policy(contract.ursula,