Python 3 fix for sphinx doc

In Python 3, dict methods dict.keys() return “views” instead of lists.
Therefore, the code:

    impls = sorted(matrix.targets.keys())
    impls.sort()

should be replaced by:

    impls = sorted(matrix.targets.keys())

to be Python 3 compatible.

Change-Id: I50477b0ac43adff9e9b0220bd7c48d6ebb6471b3
This commit is contained in:
Thomas Goirand 2018-02-15 14:21:58 +01:00
parent 9526802915
commit 8ca01a3abb
1 changed files with 2 additions and 4 deletions

View File

@ -337,8 +337,7 @@ class FeatureMatrixDirective(rst.Directive):
summaryhead.append(header)
# then one column for each hypervisor driver
impls = matrix.targets.keys()
impls.sort()
impls = sorted(matrix.targets.keys())
for key in impls:
target = matrix.targets[key]
implcol = nodes.entry()
@ -378,8 +377,7 @@ class FeatureMatrixDirective(rst.Directive):
classes=["fm_maturity_" + feature.maturity]))
# and then one column for each hypervisor driver
impls = matrix.targets.keys()
impls.sort()
impls = sorted(matrix.targets.keys())
for key in impls:
target = matrix.targets[key]
impl = feature.implementations[key]