Skip to content

Commit

Permalink
(fix) Implement get_ofac_list_path without a loop
Browse files Browse the repository at this point in the history
  • Loading branch information
shibaeff committed Sep 23, 2024
1 parent 387b1fc commit 901c5a9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pyinjective/ofac.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ def __init__(self):

@classmethod
def get_ofac_list_path(cls):
current_directory = os.getcwd()
while os.path.basename(current_directory) != "sdk-python":
current_directory = os.path.dirname(current_directory)
return os.path.join(os.path.join(current_directory, "pyinjective"), OFAC_LIST_FILENAME)
return os.path.join(os.path.dirname(__file__), OFAC_LIST_FILENAME)

@classmethod
async def download_ofac_list(cls):
Expand Down

0 comments on commit 901c5a9

Please sign in to comment.