[ovs-dev] [PATCH 27/55] python: Use six.unichr().

Russell Bryant russell at ovn.org
Mon Dec 21 20:47:27 UTC 2015


six.unichr() is equivalent to unichr() in Python 2
and chr() in Python 3.

Signed-off-by: Russell Bryant <russell at ovn.org>
---
 python/ovs/json.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/ovs/json.py b/python/ovs/json.py
index a59a0c2..db74397 100644
--- a/python/ovs/json.py
+++ b/python/ovs/json.py
@@ -408,7 +408,7 @@ class Parser(object):
                 inp = inp[6:]
             else:
                 code_point = c0
-            out += unichr(code_point)
+            out += six.unichr(code_point)
         self.__parser_input('string', out)
 
     def __lex_string_escape(self, c):
-- 
2.5.0




More information about the dev mailing list