Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iptools/ipv4.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def long2ip(l):
:returns: Dotted-quad ip address (eg. '127.0.0.1').
:raises: TypeError
"""
if MAX_IP < l or l < MIN_IP:
if not isinstance(l, int) or isinstance(l, bool) or MAX_IP < l or l < MIN_IP:
raise TypeError(
"expected int between %d and %d inclusive" % (MIN_IP, MAX_IP))
return '%d.%d.%d.%d' % (
Expand Down