DataSourceAzure is not compatible with python 2.6

Bug #1232175 reported by Roman Verchikov
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Unassigned

Bug Description

cloudinit/sources/DataSourceAzure.py : 398 uses dict comprehension which is not available prior to python 2.7.

attrs = {k: v for k, v in child.attributes.items()}

must be changed to

attrs = dict([(k, v) for k, v in child.attributes.items()])

or event to

attrs = child.attributes

in case child.attributes is a python dict (haven't checked actual types)

Related branches

Revision history for this message
Scott Moser (smoser) wrote : Re: [Bug 1232175] [NEW] DataSourceAzure is not compatible with python 2.6

Did you use some tool to find this ? One that I can easily run ?

Revision history for this message
Roman Verchikov (rverchikov) wrote :

I have simply run 'cloud-init -d init -l' and it crashed with the stacktrace. You obviously need python 2.6 installed to verify that.

Scott Moser (smoser)
Changed in cloud-init:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

fixed in upstream revno 888.

Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

fixed in 0.7.4

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers