Modified Packet.summary() to take conf.emph in account

This commit is contained in:
Phil 2009-10-29 16:08:01 +01:00
parent f649568b74
commit c5fa52bbdf
1 changed files with 6 additions and 0 deletions

View File

@ -923,6 +923,12 @@ A side effect is that, to obtain "{" and "}" characters, you must use
found = 1
if not ret:
ret = self.__class__.__name__
if self.__class__ in conf.emph:
impf = []
for f in self.fields_desc:
if f in conf.emph:
impf.append("%s=%s" % (f.name, f.i2repr(self, self.getfieldval(f.name))))
ret = "%s [%s]" % (ret," ".join(impf))
ret = "%s%s" % (ret,s)
return found,ret,needed