Fixes checks for free console and aux ports.

This commit is contained in:
grossmj
2014-04-11 16:24:08 -06:00
parent 96231e3f7f
commit e70ea26639
3 changed files with 18 additions and 7 deletions

View File

@ -351,7 +351,7 @@ class DynamipsHypervisor(object):
socket_type = socket.SOCK_STREAM
for port in range(start_port, end_port):
if port > end_port:
if port + 1 == end_port:
raise DynamipsError("Could not find a free port between {0} and {1}".format(start_port, end_port))
try:
if ":" in host: