From 22c7919114f67d64f99c8154e15ea35c52f2fe85 Mon Sep 17 00:00:00 2001 From: Wynn Wilkes Date: Fri, 30 Apr 2021 14:06:27 -0600 Subject: [PATCH] Update to the environment_{file|loader} feature to fix compatibility with python 3.{4,5,6} --- supervisor/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/options.py b/supervisor/options.py index e05266429..75c61b5be 100644 --- a/supervisor/options.py +++ b/supervisor/options.py @@ -1978,7 +1978,7 @@ def load_external_environment_definition_for_config(cls, config): try: from subprocess import check_output, CalledProcessError kwargs = dict(shell=True) - if not PY2: + if sys.version_info.major >= 3 and sys.version_info.minor >= 7: kwargs['text'] = True envdata = check_output(config.environment_loader, **kwargs)