1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

buildtools: Use isinstance() to compare types

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Jo Sutton 2024-07-02 16:40:49 +12:00 committed by Douglas Bagnall
parent 48963251fb
commit 3249bce0fe

View File

@ -202,7 +202,7 @@ also accepted as dictionary entries here
string_types = str string_types = str
if isinstance(value, string_types): if isinstance(value, string_types):
string += "\"%s\"" % value string += "\"%s\"" % value
elif type(value) is int: elif isinstance(value, int):
string += "%d" % value string += "%d" % value
else: else:
raise Exception("Unknown type for %s: %r" % (name, value)) raise Exception("Unknown type for %s: %r" % (name, value))