diff options
author | Alexander_Kabui | 2024-09-02 15:15:01 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-09-02 15:15:01 +0300 |
commit | 086c80510ff418bca77f544d3dd4b174d2dc9c8e (patch) | |
tree | 211b6ca5b54c8c52bfa179e3ffdd54878ef34f72 | |
parent | 2e81e48695e9b5618746c8cd1c6c83b452836442 (diff) | |
download | genenetwork3-086c80510ff418bca77f544d3dd4b174d2dc9c8e.tar.gz |
Remove unecessary check for open file.
-rw-r--r-- | gn3/llms/process.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gn3/llms/process.py b/gn3/llms/process.py index c3e6eda..ef925c4 100644 --- a/gn3/llms/process.py +++ b/gn3/llms/process.py @@ -94,10 +94,8 @@ def load_file(filename, dir_path): dir_path: base directory for the file Returns: json data read to a dict """ - file_path = os.path.join(dir_path, f"{filename}") - if not os.path.isfile(file_path): - raise FileNotFoundError(f"{filename} was not found or is a directory") - with open(file_path, "rb") as file_handler: + with open(os.path.join(dir_path, f"{filename}"), + "rb") as file_handler: return json.load(file_handler) |