curtin_userdata fails on 1.10 because of python3 bytes object nonsense

Bug #1548467 reported by Jeff Lane on 2016-02-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jeff Lane

Bug Description

curtin_userdata has some python2 code that doesn't work on 1.10 and Xenial due to the switch to Python3 in MAAS there.

This fails because

cache_output = check_output(['apt-cache', 'policy', 'maas'])

now returns a bytes object, rather than strings.

Simple fix, decode the output to utf-8 when we run check_output.

Related branches

Jeff Lane (bladernr) wrote :

Tested fix on both 1.10/Xenial and 1.9/Trusty, and it seems to work just fine.

Changed in maas-cert-server:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Jeff Lane (bladernr) on 2016-02-22
Changed in maas-cert-server:
status: Fix Released → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers