Skip to content

Commit 699cd1e

Browse files
committed
Fix issues.
tehmaze#67 tehmaze#68 All tests (tehmaze#69) is passed for this code. May be this fix will be useful.
1 parent 5d20ad6 commit 699cd1e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ipcalc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def __init__(self, ip, mask=None, version=0):
165165
raise ValueError('Invalid netmask')
166166

167167
#hard fix https://github.com/tehmaze/ipcalc/issues/67
168-
if self.v != 6 and len(self.dq) > 15 and ':' in self.dq:
168+
if self.v != 6 and (len(self.dq) > 15 or ':' in self.dq):
169169
self.v = 6
170170

171171
# Validate subnet size

0 commit comments

Comments
 (0)