Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterain98 committed Dec 18, 2023
1 parent 1682ffa commit 258ddfd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
from AlistClient.AlistClient import AlistClient
from dotenv import load_dotenv


dotenv_exists = os.path.exists(".env")
if not dotenv_exists:
print("Please create .env file first.")
exit(1)
load_dotenv()
client = AlistClient(os.getenv("ALIST_HOST"), os.getenv("ALIST_USERNAME"), os.getenv("ALIST_PASSWORD"))

Expand Down Expand Up @@ -86,4 +91,5 @@ def main():


if __name__ == "__main__":
print(f"Setting host to {os.getenv('ALIST_HOST')}")
main()

0 comments on commit 258ddfd

Please sign in to comment.