Use executable for subprocess

This commit is contained in:
Ruud
2012-01-20 13:53:28 +01:00
parent c9bb756a97
commit 1b01c104b6
+2 -1
View File
@@ -10,6 +10,7 @@ from flask.helpers import json
import os
import re
import subprocess
import sys
import time
import traceback
@@ -335,7 +336,7 @@ class Scanner(Plugin):
lib_dir = os.path.join(Env.get('app_dir'), 'libs')
script = os.path.join(lib_dir, 'getmeta.py')
p = subprocess.Popen(["python", script, filename], stdout = subprocess.PIPE, stderr = subprocess.PIPE, cwd = lib_dir)
p = subprocess.Popen([sys.executable, script, filename], stdout = subprocess.PIPE, stderr = subprocess.PIPE, cwd = lib_dir)
z = p.communicate()[0]
try: