These are several kinds of python3 compatibility idioms.

Signed-off-by: IWAMOTO Toshihiro <[email protected]>
---
 ryu/tests/switch/tester.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
index 815ea27..6c4e233 100644
--- a/ryu/tests/switch/tester.py
+++ b/ryu/tests/switch/tester.py
@@ -1322,7 +1322,7 @@ class TestFile(stringify.StringifyMixin):
                 self._normalize_test_json(v)
 
     def _get_tests(self, path):
-        with open(path, 'rb') as fhandle:
+        with open(path, 'r') as fhandle:
             buf = fhandle.read()
             try:
                 json_list = json.loads(buf)
@@ -1334,7 +1334,7 @@ class TestFile(stringify.StringifyMixin):
                         self.tests.append(Test(test_json))
             except (ValueError, TypeError) as e:
                 result = (TEST_FILE_ERROR %
-                          {'file': path, 'detail': e.message})
+                          {'file': path, 'detail': str(e)})
                 self.logger.warning(result)
 
 
@@ -1349,7 +1349,7 @@ class Test(stringify.StringifyMixin):
         def __test_pkt_from_json(test):
             data = eval('/'.join(test))
             data.serialize()
-            return str(data.data)
+            return six.binary_type(data.data)
 
         def __normalize_match(ofproto, match):
             match_json = match.to_jsondict()
-- 
2.1.4


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to