add --dump to preamble_size.py.

This commit is contained in:
David Wilson 2018-08-18 14:17:41 +01:00
parent a561fb79e5
commit 8b800e4798
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ contexts.
""" """
import inspect import inspect
import sys
import zlib import zlib
import mitogen.fakessh import mitogen.fakessh
@ -24,6 +25,10 @@ print('Preamble size: %s (%.2fKiB)' % (
len(stream.get_preamble()), len(stream.get_preamble()),
len(stream.get_preamble()) / 1024.0, len(stream.get_preamble()) / 1024.0,
)) ))
if '--dump' in sys.argv:
print(zlib.decompress(stream.get_preamble()))
exit()
print( print(
' ' ' '