From 0336de67228069ab0382149f9b29925f8af1361d Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Tue, 6 Mar 2018 21:35:56 +0000 Subject: [PATCH] parent: Combine first stage imports SSH command size: 443 (-5 bytes) Preamble size: 8962 --- mitogen/parent.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mitogen/parent.py b/mitogen/parent.py index 873c776c..4502f186 100644 --- a/mitogen/parent.py +++ b/mitogen/parent.py @@ -326,7 +326,6 @@ class Stream(mitogen.core.Stream): # Optimized for minimum byte count after minification & compression. @staticmethod def _first_stage(): - import os,sys R,W=os.pipe() r,w=os.pipe() if os.fork(): @@ -361,7 +360,7 @@ class Stream(mitogen.core.Stream): # same str (2.x) or an equivalent bytes (3.x). return [ self.python_path, '-c', - 'import codecs;_=codecs.decode;' + 'import codecs,os,sys;_=codecs.decode;' 'exec(_(_("%s".encode(),"base64"),"zip"))' % (encoded,) ]