]> git.ipfire.org Git - collecty.git/blobdiff - src/collecty/plugins/conntrack.py
Migrate to Python 3
[collecty.git] / src / collecty / plugins / conntrack.py
index 0e1c6d9009c72fff278cd410325cb66ccaa73f4e..82f9e6afb61ebd5c8d8da712bb4181f1d6478b5b 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 ###############################################################################
 #                                                                             #
 # collecty - A system statistics collection daemon for IPFire                 #
@@ -21,7 +21,7 @@
 
 import os
 
-import base
+from . import base
 
 from ..i18n import _
 
@@ -117,7 +117,7 @@ class ConntrackTable(object):
                                        layer4_protocol = "other"
 
                                # Count connection states
-                               if self.protocol_states.has_key(layer4_protocol):
+                               if layer4_protocol in self.protocol_states:
                                        state = line[5]
 
                                        try: