~andreserl/maas/lp1592666

« back to all changes in this revision

Viewing changes to src/maascli/actions/boot_resources_create.py

  • Committer: LaMont Jones
  • Date: 2016-04-11 16:23:26 UTC
  • mfrom: (4900 maas)
  • mto: This revision was merged to the branch mainline in revision 4924.
  • Revision ID: lamont@canonical.com-20160411162326-6ycj8l2j66v2o5es
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
 
132
132
    def get_resource_file(self, content):
133
133
        """Return the boot resource file for the created file."""
 
134
        if isinstance(content, bytes):
 
135
            content = content.decode('utf-8')
134
136
        data = json.loads(content)
135
137
        if len(data['sets']) == 0:
136
138
            # No sets returned, no way to get the resource file.