[Tutor] Help with error handling in a while loop

Mike Bell ternary at gmail.com
Fri Feb 18 18:56:34 CET 2005

I haven't tried the code, but it looks like you need to increment on
connection failures, too.  I think it's more pythonic to iterate over
a range, as in the following

for test_port in range(start_port, end_port)

but it would suffice to just move the start_port+=1 outside of the try

More information about the Tutor mailing list