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

sanitytest: count with the fact that large enums can be long

On 32-bit systems, one new flag that has the value of 1 << 31, namely
VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS, fails to fit into an
'int' on python and is therefore of type 'long'.  Fix sanitytest to
count with such fact in order to avoid build failures on 32-bit systems.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander
2014-10-07 10:08:38 +02:00
parent 09b157076f
commit c58c7f362a

View File

@ -84,7 +84,7 @@ for name in dir(libvirt):
thing = getattr(libvirt, name)
# Special-case libvirtError to deal with python 2.4 difference
# in Exception class type reporting.
if type(thing) == int:
if type(thing) in (int, long):
gotenums.append(name)
elif type(thing) == type or name == "libvirtError":
gottypes.append(name)