Fix retrying when finding an available port for a Perforce stunnel.
Review Request #10942 — Created March 9, 2020 and submitted
When setting up stunnel for Perforce, we try to find an available local
port we can open for the local end of the tunnel. The intent of the
logic here was to keep trying until we've found some port, retrying any
time we hit an error trying to open one (usually a result of the port
already being opened).
The logic was flawed. We had the
try/finally, but no
that the first failure would bubble up out of the function. Retrying
never actually occurred.
This change fixes that, adding an empty
exceptthat just lets us
continue again. It also fixes up some bare
except:lines, just to
Unit tests passed.