diff --git a/libpkpass/commands/distribute.py b/libpkpass/commands/distribute.py index 3a2c1a0..f7c8643 100644 --- a/libpkpass/commands/distribute.py +++ b/libpkpass/commands/distribute.py @@ -47,6 +47,7 @@ def _run_command_execution(self): passphrase=self.passphrase, card_slot=self.args['card_slot']) + password.read_password_data(dist_pass) password.add_recipients(secret=plaintext_pw, distributor=self.args['identity'], recipients=self.recipient_list, diff --git a/libpkpass/password.py b/libpkpass/password.py index 05c91c8..891490c 100644 --- a/libpkpass/password.py +++ b/libpkpass/password.py @@ -111,9 +111,10 @@ def add_recipients( if recipients is None: recipients = [] - self.recipients = {r:self._add_recipient( + new_recipients = {r:self._add_recipient( r, secret, distributor, identitydb, encryption_algorithm, passphrase, card_slot ) for r in recipients} + self.recipients.update(new_recipients) if escrow_users: #escrow_users may now be none after the set operations if (len(escrow_users) > 3) and (len(list((set(escrow_users) - set(recipients)))) < 3):