pep8 cleanup on get_random_open_port function

Tried adhering more strictly to PEP8 coding style.  FYI I could have amended my previous pull request.