From d9cc577a6cb0908a6d1b922f92bace01dea9e4ff Mon Sep 17 00:00:00 2001 From: David Wilson Date: Mon, 12 Aug 2019 16:50:27 +0100 Subject: [PATCH] issue #440: log Python version during bootstrap. --- mitogen/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mitogen/core.py b/mitogen/core.py index d6e1739e..2f52ebe4 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -3919,7 +3919,7 @@ class ExternalContext(object): self.router.register(self.parent, self.stream) self.router._setup_logging() - sys.executable = os.environ.pop('ARGV0', sys.executable) + _v and LOG.debug('Python version is %s', sys.version) _v and LOG.debug('Parent is context %r (%s); my ID is %r', self.parent.context_id, self.parent.name, mitogen.context_id) @@ -3927,6 +3927,8 @@ class ExternalContext(object): os.getpid(), os.getppid(), os.geteuid(), os.getuid(), os.getegid(), os.getgid(), socket.gethostname()) + + sys.executable = os.environ.pop('ARGV0', sys.executable) _v and LOG.debug('Recovered sys.executable: %r', sys.executable) if self.config.get('send_ec2', True):