Skip to content
Snippets Groups Projects
Commit bf41d9ad authored by Phil's avatar Phil
Browse files

Have Packet.show() indent field values represented on several lines

parent 922b21f9
No related branches found
No related tags found
No related merge requests found
......@@ -801,10 +801,16 @@ Creates an EPS file describing a packet. If filename is not provided a temporary
for fvalue in fvalue_gen:
fvalue.show(indent=indent, label_lvl=label_lvl+lvl+" |")
else:
print "%s %-10s%s %s" % (label_lvl+lvl,
ncol(f.name),
ct.punct("="),
vcol(f.i2repr(self,fvalue)))
begn = "%s %-10s%s " % (label_lvl+lvl,
ncol(f.name),
ct.punct("="),)
reprval = f.i2repr(self,fvalue)
if type(reprval) is str:
reprval = reprval.replace("\n", "\n"+" "*(len(label_lvl)
+len(lvl)
+len(f.name)
+4))
print "%s%s" % (begn,vcol(reprval))
self.payload.show(indent=indent, lvl=lvl+(" "*indent*self.show_indent), label_lvl=label_lvl)
def show2(self):
"""Prints a hierarchical view of an assembled version of the packet, so that automatic fields are calculated (checksums, etc.)"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment