Skip to content

Commit

Permalink
Fix for requests being called before dependency test
Browse files Browse the repository at this point in the history
That fixes an instant crash when the user have not installed the dependencies, by only calling it after the code makes sure it is installed

Signed-off-by: nanometer5088 <[email protected]>
  • Loading branch information
nanometer5088 committed Jul 13, 2023
1 parent a9fa31a commit 84b19d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import platform
import sys

import requests

from log import logtofile as log


Expand Down Expand Up @@ -56,6 +54,9 @@ def init(silent):
log("Operating System and Python detection finished\n")

log("Started update / networking test")

import requests

try:
link = requests.get(
"https://raw.githubusercontent.com/nanometer5088/CLI-TikTok/main/src/constants.py"
Expand Down

0 comments on commit 84b19d1

Please sign in to comment.