From 5562e5ff2d811691f5ab7f514759a366e1d83b98 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 3 Nov 2019 03:53:57 -0600 Subject: [PATCH] change to python based import run solution --- app/spotify.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/spotify.py b/app/spotify.py index c6ff873..cbe7d1a 100644 --- a/app/spotify.py +++ b/app/spotify.py @@ -21,6 +21,8 @@ def check_and_update(): @app.route('/spotify/') def spotify(): if check_and_update(): - print('Graph out of date - running udpate command') - r = subprocess.run(['python3', '/home/xevion/xevion.dev/app/spotify_explicit/main.py']) + from .spotify_explicit import main + print('Graph out of date - running update command') + main.main() + # r = subprocess.run(['python3', '/home/xevion/xevion.dev/app/spotify_explicit/main.py']) return send_file('spotify_explicit/export/export.png') \ No newline at end of file