summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2017-02-03 10:44:00 +0100
committerJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2017-02-03 10:44:00 +0100
commit6dd57dc8ebf1db3f143350c46890a2a8bff3308c (patch)
tree82852d8f538e283371849fc8420bc4224bbb4fb5
parentaa37a6e1e65cd6eeada2d00e0a0210e44fea42e6 (diff)
downloadqtivi-qface-6dd57dc8ebf1db3f143350c46890a2a8bff3308c.tar.gz
Ensured the script is always called with the correct python executable in reload mode
-rw-r--r--qface/watch.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/qface/watch.py b/qface/watch.py
index 89d07e4..ca3ec73 100644
--- a/qface/watch.py
+++ b/qface/watch.py
@@ -4,6 +4,7 @@ import click
from subprocess import call
from path import Path
import time
+import sys
def sh(cmd, all=False, **kwargs):
@@ -24,7 +25,8 @@ class RunScriptChangeHandler(FileSystemEventHandler):
if self.is_running:
return
self.is_running = True
- sh(self.script, cwd=Path.getcwd())
+ cmd = '{0} {1}'.format(sys.executable, self.script)
+ sh(cmd, cwd=Path.getcwd())
self.is_running = False