If 'object' happened to be a tuple, we would get one of the following
errors:
TypeError: not enough arguments for format string
TypeError: not all arguments converted during string formatting
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
def ndr_print(object):
ndr_print = getattr(object, "__ndr_print__", None)
if ndr_print is None:
- raise TypeError("%r is not a NDR object" % object)
+ raise TypeError(f"{object} is not a NDR object")
return ndr_print()