From 11c81f465f0ee78c91998bfb5ce3b1fda8b6bffe Mon Sep 17 00:00:00 2001 From: girst Date: Thu, 30 Jul 2020 09:37:49 +0200 Subject: [PATCH] fix running __main__ --- app/__main__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/__main__.py b/app/__main__.py index 749dc90..6999808 100755 --- a/app/__main__.py +++ b/app/__main__.py @@ -1,14 +1,15 @@ #!/bin/sh ''':' . "`dirname "$0"`/../venv/bin/activate" -export YT_CONFIG=/opt/yt/config/config.ini +# uncomment if you aren't using /etc/yt/config.ini: +#export YT_CONFIG=/opt/yt/config/config.ini exec python3 "$0" "$@" ':''' if __package__ is None: # called as ./__main__.py import sys, os - sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) + sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from app import app -- 2.39.3