Stdout problem struggling + add access_token to gitignore
This commit is contained in:
@@ -8,10 +8,14 @@ import time
|
||||
import requests
|
||||
from datetime import datetime
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
app = Flask(__name__)
|
||||
stop_flask = threading.Event()
|
||||
|
||||
logger = logging.getLogger('flask')
|
||||
logger.setLevel(logging.ERROR) # Set to ERROR to ignore lower levels
|
||||
|
||||
client_id = "c0020cc0e05245efb2ddb61b7045e4f2"
|
||||
client_secret = "2e2e7c98f849403fbacc219c1f01c17d"
|
||||
redirect_uri = "https://elease-uncapsuled-yosef.ngrok-free.dev/callback" # Hardcoded ngrok URL
|
||||
@@ -86,8 +90,8 @@ def create_playlist():
|
||||
def run_flask():
|
||||
with open(os.devnull, 'w') as fnull:
|
||||
# Redirect both stdout and stderr to devnull
|
||||
sys.stdout = fnull
|
||||
sys.stderr = fnull
|
||||
#sys.stdout = fnull
|
||||
sys.stderr = fnull # COMMENT FOR DEBUG
|
||||
subprocess.run(["xdg-open", "http://192.168.0.100:8888"])
|
||||
app.run(host="0.0.0.0", port=8888, use_reloader=False)
|
||||
# sys.stdout = sys.__stdout__ # Restore original stdout
|
||||
|
||||
Reference in New Issue
Block a user