fix(torrent_api): move load_env to main
This commit is contained in:
1 parent
8eb7f77751
commit
e889a4dc73
1 file changed
+3
-4
+3
-4
@@ -7,9 +7,8 @@ from dotenv import load_dotenv
|
||||
|
||||
from torrent_api.cli import main
|
||||
|
||||
working_env = Path.cwd() / ".env"
|
||||
execution_env = Path(__file__).resolve().parent / ".env"
|
||||
load_dotenv(working_env if working_env.is_file() else execution_env)
|
||||
|
||||
if __name__ == "__main__":
|
||||
working_env = Path.cwd() / ".env"
|
||||
execution_env = Path(__file__).resolve().parent / ".env"
|
||||
load_dotenv(working_env if working_env.is_file() else execution_env)
|
||||
sys.exit(main())
|
||||
Reference in new issue
Block a user