diff --git a/scapy/config.py b/scapy/config.py index 16226db8c691def11f6f0979f143d34e0f4f0b78..7e8d0df8f48ca71bb9f0937a6ff4a69f26748d0f 100644 --- a/scapy/config.py +++ b/scapy/config.py @@ -20,7 +20,12 @@ class ConfClass: keys.sort() for i in keys: if i[0] != "_": - s += "%-10s = %s\n" % (i, repr(getattr(self, i))) + r = repr(getattr(self, i)) + r = r.replace("\n"," ") + wlen = 78-max(len(i),10) + if len(r) > wlen: + r = r[:wlen-3]+"..." + s += "%-10s = %s\n" % (i, r) return s[:-1] class ProgPath(ConfClass):