tempest-lib: can't recieve bytes output from ssh under pyhton3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tempest |
Fix Released
|
Undecided
|
Andrey Pavlov |
Bug Description
I tried to run tests under python3 and got error from tempest_
This error occurs because channel returns binary_type under python3
(0):~/stackforg
ec2api.
test_userdata FAIL
Slowest 1 tests took 120.23 secs:
ec2api.
test_userdata 120.23
=======
FAIL: ec2api.
-------
Traceback (most recent call last):
testtools.
2015-09-13 10:18:29,570 15182 WARNING [tempest_
2015-09-13 10:18:32,568 15182 WARNING [tempest_
2015-09-13 10:18:36,953 15182 WARNING [tempest_
}}}
Traceback (most recent call last):
File "/home/
data = ssh_client.
File "/usr/local/
return ''.join(out_data)
TypeError: sequence item 0: expected str instance, bytes found
Ran 1 test in 121.986s
FAILED (failures=1)
Changed in tempest: | |
assignee: | nobody → Andrey Pavlov (apavlov-e) |
status: | New → In Progress |
Changed in tempest: | |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /review. openstack. org/222901 /git.openstack. org/cgit/ openstack/ tempest- lib/commit/ ?id=083f56ddc97 4beab4cd51e04ce 25d38990151dad
Committed: https:/
Submitter: Jenkins
Branch: master
commit 083f56ddc974bea b4cd51e04ce25d3 8990151dad
Author: Andrey Pavlov <email address hidden>
Date: Sun Sep 13 10:50:06 2015 +0300
python3: converts binary data from channel
paramiko returns chunk of binary type.
So code must join all chunks with binary type and not as str.
Also this patchset adds one more parameter 'encoding' for exec
function to decode binary result to str.
Closes-Bug: #1495181 53876ece7b6d1ac 2df7e49d701
Change-Id: I886c9d0c143d35