提交 8787afc3 编写于 作者: P Paolo Bonzini

avoid comparison between None and int

Part of fixing selftests.unit.test_xunit under Python 3.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 a259fed2
...@@ -79,7 +79,7 @@ class TestName(object): ...@@ -79,7 +79,7 @@ class TestName(object):
:param no_digits: number of digits of the test uid :param no_digits: number of digits of the test uid
""" """
self.uid = uid self.uid = uid
if no_digits >= 0: if no_digits is not None and no_digits >= 0:
self.str_uid = str(uid).zfill(no_digits if no_digits else 3) self.str_uid = str(uid).zfill(no_digits if no_digits else 3)
else: else:
self.str_uid = str(uid) self.str_uid = str(uid)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册