• 
      

    Fix retrying when finding an available port for a Perforce stunnel.

    Review Request #10942 — Created March 9, 2020 and submitted — Latest diff uploaded

    Information

    Review Board
    release-3.0.x

    Reviewers

    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 except, meaning
    that the first failure would bubble up out of the function. Retrying
    never actually occurred.

    This change fixes that, adding an empty except that just lets us
    continue again. It also fixes up some bare except: lines, just to
    satisfy linters.

    Unit tests passed.

    Commits

    Files