|
|
@ -16,15 +16,14 @@ def def_credentials(chain): |
|
|
|
rpcport = ''; |
|
|
|
operating_system = platform.system() |
|
|
|
if operating_system == 'Darwin': |
|
|
|
ac_dir = os.environ['HOME'] + '/Library/Application Support/Komodo' |
|
|
|
ac_dir = os.environ['HOME'] + '/Library/Application Support/Hush' |
|
|
|
elif operating_system == 'Linux': |
|
|
|
ac_dir = os.environ['HOME'] + '/.komodo' |
|
|
|
ac_dir = os.environ['HOME'] + '/.hush' |
|
|
|
elif operating_system == 'Windows': |
|
|
|
ac_dir = '%s/komodo/' % os.environ['APPDATA'] |
|
|
|
if chain == 'KMD': |
|
|
|
coin_config_file = str(ac_dir + '/komodo.conf') |
|
|
|
else: |
|
|
|
coin_config_file = str(ac_dir + '/' + chain + '/' + chain + '.conf') |
|
|
|
ac_dir = '%s/hush/' % os.environ['APPDATA'] |
|
|
|
|
|
|
|
coin_config_file = str(ac_dir + '/' + chain + '/' + chain + '.conf') |
|
|
|
|
|
|
|
with open(coin_config_file, 'r') as f: |
|
|
|
for line in f: |
|
|
|
l = line.rstrip() |
|
|
@ -35,8 +34,8 @@ def def_credentials(chain): |
|
|
|
elif re.search('rpcport', l): |
|
|
|
rpcport = l.replace('rpcport=', '') |
|
|
|
if len(rpcport) == 0: |
|
|
|
if chain == 'KMD': |
|
|
|
rpcport = 7771 |
|
|
|
if chain == 'HUSH3': |
|
|
|
rpcport = 18031 |
|
|
|
else: |
|
|
|
print("rpcport not in conf file, exiting") |
|
|
|
print("check " + coin_config_file) |
|
|
|