From 4358c5d2d222eaf63c62e667d8252684f51f749a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 7 Nov 2015 09:06:38 +0100 Subject: [PATCH] misc: cut locals displayed in traces to 10000 characters (#8904) --- wcs/qommon/publisher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wcs/qommon/publisher.py b/wcs/qommon/publisher.py index fbd957c..5af2dd3 100644 --- a/wcs/qommon/publisher.py +++ b/wcs/qommon/publisher.py @@ -210,7 +210,10 @@ class QommonPublisher(Publisher): for key, value in locals: print >>error_file, " %s =" % key, try: - print >>error_file, repr(value), + repr_value = repr(value) + if len(repr_value) > 10000: + repr_value = repr_value[:10000] + ' [...]' + print >>error_file, repr_value, except: print >>error_file, "", print >>error_file -- 2.6.2