Limit length in use_ascii mode
This commit is contained in:
parent
c3726bcaa2
commit
d5ed3e1aaa
|
@ -59,9 +59,9 @@ class SafeRepr(reprlib.Repr):
|
||||||
def repr(self, x: object) -> str:
|
def repr(self, x: object) -> str:
|
||||||
try:
|
try:
|
||||||
if self.use_ascii:
|
if self.use_ascii:
|
||||||
return ascii(x)
|
s = ascii(x)
|
||||||
|
else:
|
||||||
s = super().repr(x)
|
s = super().repr(x)
|
||||||
except (KeyboardInterrupt, SystemExit):
|
except (KeyboardInterrupt, SystemExit):
|
||||||
raise
|
raise
|
||||||
except BaseException as exc:
|
except BaseException as exc:
|
||||||
|
|
Loading…
Reference in New Issue