makeapi: use the same formatting for int and long values

This prevents validation failures on architectures where integer is less
than 32 bits.

https://fedorahosted.org/freeipa/ticket/5894

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Jan Cholasta 2016-05-19 16:24:47 +02:00 committed by Martin Basti
parent 5452006498
commit 83f6ddb473

View File

@ -558,6 +558,8 @@ class Param(ReadOnly):
value = self.__kw[key]
if callable(value) and hasattr(value, '__name__'):
value = value.__name__
elif isinstance(value, six.integer_types):
value = str(value)
else:
value = repr(value)
yield '%s=%s' % (key, value)