issue #440: log Python version during bootstrap.

This commit is contained in:
David Wilson 2019-08-12 16:50:27 +01:00
parent 49796e0c39
commit d9cc577a6c
1 changed files with 3 additions and 1 deletions

View File

@ -3919,7 +3919,7 @@ class ExternalContext(object):
self.router.register(self.parent, self.stream) self.router.register(self.parent, self.stream)
self.router._setup_logging() 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', _v and LOG.debug('Parent is context %r (%s); my ID is %r',
self.parent.context_id, self.parent.name, self.parent.context_id, self.parent.name,
mitogen.context_id) mitogen.context_id)
@ -3927,6 +3927,8 @@ class ExternalContext(object):
os.getpid(), os.getppid(), os.geteuid(), os.getpid(), os.getppid(), os.geteuid(),
os.getuid(), os.getegid(), os.getgid(), os.getuid(), os.getegid(), os.getgid(),
socket.gethostname()) socket.gethostname())
sys.executable = os.environ.pop('ARGV0', sys.executable)
_v and LOG.debug('Recovered sys.executable: %r', sys.executable) _v and LOG.debug('Recovered sys.executable: %r', sys.executable)
if self.config.get('send_ec2', True): if self.config.get('send_ec2', True):