Fix, Check requirements.txt in script dir instead of config

When run not on docker, check for requirements.txt from the dir where the script resides instead of the config dir when using --config command for a different directory.
pull/1928/head
jz1 8 months ago committed by GitHub
parent dc19fd29a9
commit 3bcc3cc829
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -240,7 +240,7 @@ def start(attrs):
required_version = None
if not is_docker and not is_linuxserver:
try:
with open("requirements.txt", "r") as file:
with open(os.path.abspath(os.path.join(os.path.dirname(__file__), "requirements.txt")), "r") as file:
required_version = next(ln.strip()[9:] for ln in file.readlines() if ln.strip().startswith("PlexAPI=="))
except FileNotFoundError:
logger.error(" File Error: requirements.txt not found")

Loading…
Cancel
Save