提交 b6f6a0d9 编写于 作者: A Andrea Bolognani

python3: Fix sort function

This deals with cls.version possibly being None.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 b98d4244
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册