forked from kate/uniborg
truncate really long byte sequences
This commit is contained in:
parent
192e1d890a
commit
225e377130
|
@ -62,6 +62,9 @@ def yaml_format(obj, indent=0):
|
|||
# repr() bytes if it's printable, hex like "FF EE BB" otherwise
|
||||
if all(c in PRINTABLE_SET for c in obj):
|
||||
result.append(repr(obj))
|
||||
else:
|
||||
if len(obj) > 64:
|
||||
result.append('<…>')
|
||||
else:
|
||||
result.append(' '.join(f'{b:02X}' for b in obj))
|
||||
elif isinstance(obj, datetime.datetime):
|
||||
|
|
Loading…
Reference in New Issue