From d3cd8d93e805ca8dd0b685c08274b83655e1a748 Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Mon, 16 May 2005 23:21:01 +0000 Subject: [PATCH] Add get_hide() to return the value of the "hide" tag in field attributes. svn path=/trunk/; revision=14379 --- tools/EtherealXML.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/EtherealXML.py b/tools/EtherealXML.py index d75464e84f..b94ea48189 100644 --- a/tools/EtherealXML.py +++ b/tools/EtherealXML.py @@ -96,6 +96,7 @@ class ProtoTreeItem(PacketList): self.size = xmlattrs.get("size", "") self.value = xmlattrs.get("value", "") self.show = xmlattrs.get("show", "") + self.hide = xmlattrs.get("hide", "") def add_child(self, child): self.children.append(child) @@ -118,6 +119,9 @@ class ProtoTreeItem(PacketList): def get_show(self): return self.show + def get_hide(self): + return self.hide + def dump(self, fh): if self.name: print >> fh, " name=%s" % (saxutils.quoteattr(self.name),), @@ -137,6 +141,9 @@ class ProtoTreeItem(PacketList): if self.show: print >> fh, "show=%s" % (saxutils.quoteattr(self.show),), + if self.hide: + print >> fh, "hide=%s" % (saxutils.quoteattr(self.hide),), + class Packet(ProtoTreeItem, PacketList): def dump(self, fh, indent=0): print >> fh, " " * indent, ""