Merge lp://qastaging/~sgolovatiuk/cloud-init/fix_mcollective into lp://qastaging/~cloud-init-dev/cloud-init/trunk

Proposed by Sergii Golovatiuk
Status: Merged
Merged at revision: 1254
Proposed branch: lp://qastaging/~sgolovatiuk/cloud-init/fix_mcollective
Merge into: lp://qastaging/~cloud-init-dev/cloud-init/trunk
Diff against target: 180 lines (+105/-31)
2 files modified
cloudinit/config/cc_mcollective.py (+45/-31)
tests/unittests/test_handler/test_handler_mcollective.py (+60/-0)
To merge this branch: bzr merge lp://qastaging/~sgolovatiuk/cloud-init/fix_mcollective
Reviewer Review Type Date Requested Status
cloud-init Commiters Pending
Review via email: mp+298759@code.qastaging.launchpad.net

Commit message

Fix mcollective module with python3

This fixes mcollective when used with python3 and also adds a unit test.

Description of the change

Fix cc_mcollective with python 3.

Fixes bug: 1597699

To post a comment you must log in.
1248. By Sergii Golovatiuk

Change StringIO to BytesIO in cc_mcollective.py

* StringIO from six doesn't act as 'binary stream' in Python 3.
This patch changes StringIO to BytesIO to have code compatible with
Python 3 and Python 2.
* Add try/except for IOError in case when server.cfg doesn't exists. This is
necessary for unit tests or cases when server.cfg is not included to package
* Add UnitTest for cc_mcollective.py

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.