mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +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:
parent
48963251fb
commit
3249bce0fe
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user