---
ryu/lib/ip.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ryu/lib/ip.py b/ryu/lib/ip.py
index 6630418..9ecdd90 100644
--- a/ryu/lib/ip.py
+++ b/ryu/lib/ip.py
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import six
import struct
from ryu.lib import addrconv
@@ -42,7 +43,7 @@ def ipv4_to_str(ip):
:param str ip: binary or int type representation of IPv4 address
:return: IPv4 address string
"""
- if isinstance(ip, int):
+ if isinstance(ip, six.integer_types):
return addrconv.ipv4.bin_to_text(struct.pack("!I", ip))
else:
return addrconv.ipv4.bin_to_text(ip)
--
2.7.3
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel