From 67c5a4398733a9e9121e4fcb85e4daf9eb32eddd Mon Sep 17 00:00:00 2001 From: David Coppit Date: Fri, 17 Aug 2018 20:58:35 -0400 Subject: [PATCH] Don't hard-code the Python interpreter --- monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.py b/monitor.py index 9ade6b2..54bbd4d 100755 --- a/monitor.py +++ b/monitor.py @@ -46,7 +46,7 @@ def read_config(config_file): # Shenanigans to read docker env vars, and the bash format config file. I didn't want to ask them to change their # config files. - dump_command = '/usr/bin/python3 -c "import os, json;print(json.dumps(dict(os.environ)))"' + dump_command = '{} -c "import os, json;print(json.dumps(dict(os.environ)))"'.format(sys.executable) pipe = subprocess.Popen(['/bin/bash', '-c', dump_command], stdout=subprocess.PIPE) string = pipe.stdout.read().decode('ascii')