diff options
author | Kotresh HR <khiremat@redhat.com> | 2018-09-28 06:11:52 -0400 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-10-02 05:49:24 +0000 |
commit | ff00ce1d55e34ec77e93e742533928edf653e2d2 (patch) | |
tree | 9dec37cef1e6f13996b3921f888a77d1e59b97da /extras/snap_scheduler | |
parent | d06bbb617ee9449759cd069141a085c313524298 (diff) |
georep: python2 to python3 compat - pickle
Handle py2 and py3 compatibility for pickling and unpickling.
Geo-rep pickles and unpickles reading sys.stdin and sys.stdout streams.
py2 and py3 compatibility expects the streams to be opened in binary
mode but the sys.stdout objects are different in python2
and python3
python2:
>>> type(sys.stdout)
<type 'file'>
python3:
>>> type(sys.stdout)
<class '_io.TextIOWrapper'>
So in order to access binary stream, using sys.stdin.buffer in python3
Updates: #411
Change-Id: I1a633ccdddff5baf0cf05a8b493add39ddf75bd7
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'extras/snap_scheduler')
0 files changed, 0 insertions, 0 deletions