Moved mutable out of params list.

pull/157/head
jMyles 2018-02-10 18:36:31 -08:00
parent 817277623f
commit 8ecb791823
1 changed files with 5 additions and 2 deletions

View File

@ -21,15 +21,18 @@ class NoEncryptingPower(PowerUpError):
class CryptoPower(object):
def __init__(self, power_ups=[], generate_keys_if_needed=False):
def __init__(self, power_ups=None, generate_keys_if_needed=False):
self._power_ups = {}
# TODO: The keys here will actually be IDs for looking up in a KeyStore.
self.public_keys = {}
self.generate_keys = generate_keys_if_needed
if power_ups:
if power_ups is not None:
for power_up in power_ups:
self.consume_power_up(power_up)
else:
power_ups = [] # default
def consume_power_up(self, power_up):
if isinstance(power_up, CryptoPowerUp):