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

fix writing default config #4

Merged
merged 2 commits into from
Feb 27, 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
3 changes: 1 addition & 2 deletions pacli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def first_run():
def set_up(provider):
'''setup'''

first_run() # check if this is first run first

# check if provider is working as expected
assert provider.getinfo()["connections"] > 0, {"error": "Not connected to network."}
# check if PA P2TH is loaded in local node
Expand Down Expand Up @@ -393,6 +391,7 @@ def cli():

def main():

first_run()
load_conf()
provider = pa.RpcNode(testnet=Settings.testnet)
set_up(provider)
Expand Down
1 change: 1 addition & 0 deletions pacli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .default_conf import default_conf

def write_default_config(conf_file):
print("writing default config")
config = configparser.ConfigParser()
config["settings"] = default_conf
with open(conf_file, 'w') as configfile:
Expand Down