summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2014-10-07 10:08:38 +0200
committerMartin Kletzander <mkletzan@redhat.com>2014-10-07 10:08:38 +0200
commitc58c7f362aab37e4961407c2efc8a74925ed9c37 (patch)
tree560a02c2b9a99cb312a6d9799d70311499a446b4
parent09b157076f24ef4eedbb60466087b44612517c8b (diff)
downloadlibvirt-python-c58c7f362aab37e4961407c2efc8a74925ed9c37.tar.gz
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>
-rw-r--r--sanitytest.py2
1 files changed, 1 insertions, 1 deletions
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)