Added patch for config file. #24

Merged
filipnyquist merged 1 commit from filipnyquist-patch-1 into master 2017-09-25 18:23:04 +02:00

View file

@ -1,6 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import json import json, os
from bitcoinrpc.authproxy import AuthServiceProxy from bitcoinrpc.authproxy import AuthServiceProxy
from lbryschema.decode import smart_decode from lbryschema.decode import smart_decode
from flask import Flask, url_for from flask import Flask, url_for
@ -8,7 +8,7 @@ app = Flask(__name__)
def get_lbrycrdd_connection_details(): def get_lbrycrdd_connection_details():
with open('config.json', 'r') as f: with open(os.path.dirname(os.path.realpath(__file__))+'/config.json', 'r') as f:
config = json.load(f) config = json.load(f)
rpc_user = config['rpc_user'] rpc_user = config['rpc_user']
rpc_pass = config['rpc_password'] rpc_pass = config['rpc_password']
@ -56,4 +56,4 @@ if __name__ == '__main__':
app.run(host='127.0.0.1') app.run(host='127.0.0.1')