mirror of https://gitee.com/openkylin/libvirt.git
python3: Fix sort function
This deals with cls.version possibly being None. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
b98d4244c6
commit
b6f6a0d984
|
@ -59,7 +59,7 @@ class WmiClass:
|
|||
"""
|
||||
# sort vesioned classes by version in case input file did not have them
|
||||
# in order
|
||||
self.versions = sorted(self.versions, key=lambda cls: cls.version)
|
||||
self.versions = sorted(self.versions, key=lambda cls: cls.version or "")
|
||||
|
||||
# if there's more than one verion make sure first one has name suffixed
|
||||
# because we'll generate "common" memeber and will be the "base" name
|
||||
|
|
Loading…
Reference in New Issue