Skip to content

Commit

Permalink
Update util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KolbyML committed Jan 20, 2021
1 parent 285a1c8 commit ba1e1d4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/functional/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,14 @@ def delete_cookie_file(datadir, chain):
which shouldn't be needed as if we are to test multiple different devnets we would just override setup_chain and make our own configs files.
"""
def get_chain_folder(datadir, chain):
for i in range(len(os.listdir(datadir))):
if chain in os.listdir(datadir)[i]:
chain = os.listdir(datadir)[i]
break
# if try fails the directory doesn't exist
try:
for i in range(len(os.listdir(datadir))):
if chain in os.listdir(datadir)[i]:
chain = os.listdir(datadir)[i]
break
except:
pass
return chain

def get_bip9_status(node, key):
Expand Down

0 comments on commit ba1e1d4

Please sign in to comment.