fix bugs found by pylint
diff --git a/src/python/oftest/controller.py b/src/python/oftest/controller.py
index df24c89..b23eefa 100644
--- a/src/python/oftest/controller.py
+++ b/src/python/oftest/controller.py
@@ -26,6 +26,7 @@
"""
+import sys
import os
import socket
import time
@@ -472,7 +473,7 @@
self.wakeup()
with self.connect_cv:
if self.initial_hello:
- self.message_send(hello())
+ self.message_send(ofp.message.hello())
self.connect_cv.notify() # Notify anyone waiting
else:
self.logger.error("Could not actively connect to switch %s",
diff --git a/src/python/oftest/help_formatter.py b/src/python/oftest/help_formatter.py
index 0e0a7c9..bd6feb1 100644
--- a/src/python/oftest/help_formatter.py
+++ b/src/python/oftest/help_formatter.py
@@ -7,4 +7,4 @@
indent = " "*self.current_indent
return indent + description
else:
- return none
+ return None
diff --git a/src/python/oftest/packet.py b/src/python/oftest/packet.py
index 67dffb2..1b43091 100644
--- a/src/python/oftest/packet.py
+++ b/src/python/oftest/packet.py
@@ -4,6 +4,7 @@
"""
Wrap scapy to satisfy pylint
"""
+import sys
try:
import scapy.layers.l2
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index 26c25d3..1d56f79 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -1301,7 +1301,7 @@
test.assertTrue(reply is not None, "No response to stats request")
stats.extend(reply.entries)
while reply.flags & more_flag != 0:
- reply, pkt = self.controller.poll(exp_msg=ofp.OFPT_STATS_REPLY)
+ reply, pkt = test.controller.poll(exp_msg=ofp.OFPT_STATS_REPLY)
test.assertTrue(reply is not None, "No response to stats request")
stats.extend(reply.entries)
return stats