Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch keystore class singleton behavior #14

Merged
merged 2 commits into from
Aug 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pacli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def set_up(provider):
if not Settings.production:
if not provider.listtransactions("PATEST"):
pa.pautils.load_p2th_privkeys_into_local_node(provider, prod=False)
elif Settings.provider != 'holy':
pa.pautils.load_p2th_privkeys_into_local_node(provider,keyfile)
#elif Settings.provider != 'holy':
# pa.pautils.load_p2th_privkeys_into_local_node(provider, keyfile)

def default_account_utxo(provider, amount):
'''set default address to be used with pacli'''
Expand Down
6 changes: 5 additions & 1 deletion pacli/keystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ class LocalKeyProvider(Provider):
"""

def __init__(self, keystore: GpgKeystore, **kwargs):
super(Provider, self).__init__(**kwargs)
try:
super(Provider, self).__init__(**kwargs)
except TypeError:
self.__init__hack__ = Provider.__init__
self.__init__hack__(**kwargs)
self.keystore = keystore
self.privkeys = keystore.read()

Expand Down