]> git.ipfire.org Git - collecty.git/commitdiff
conntrack: Show protocol in object representation
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 May 2015 19:07:50 +0000 (19:07 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 May 2015 19:07:50 +0000 (19:07 +0000)
src/collecty/plugins/conntrack.py

index 9a25ab25068806d228e485484186ab9d94f91ff9..0cef77b4732da3320778df91cdc815697e675b69 100644 (file)
@@ -182,6 +182,9 @@ class ConntrackProtocolWithStatesObject(ConntrackObject):
                ConntrackObject.init(self, conntrack_table)
                self.protocol = protocol
 
+       def __repr__(self):
+               return "<%s %s>" % (self.__class__.__name__, self.protocol)
+
        @property
        def states(self):
                return ConntrackTable._stateful_layer4_protocols.get(self.protocol)