From c58c7f362aab37e4961407c2efc8a74925ed9c37 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Tue, 7 Oct 2014 10:08:38 +0200 Subject: [PATCH] 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 --- sanitytest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanitytest.py b/sanitytest.py index 8cb0154..5bd85a5 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -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)