1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-08-03 08:21:58 +03:00

Avoid truncating python version number when running sanity test

The current code assumes the version number string will be only three
characters long, which fails with "3.10".

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2020-11-12 13:34:14 +00:00
parent 2035a5e2f1
commit 991ecb5de8

View File

@ -283,7 +283,9 @@ class my_test(Command):
if self.plat_name is None:
self.plat_name = get_platform()
plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])
plat_specifier = ".%s-%d.%d" % (self.plat_name,
sys.version_info[0],
sys.version_info[1])
if hasattr(sys, 'gettotalrefcount'):
plat_specifier += '-pydebug'