Do not exit python if connection fails
Following the connection, when the error : ERROR: Connection failed -- verify your username and password is encountered, do not use sys.exit(1).
Do not exit python. Just return client=None, as the script might do something else that the user does not want to loose.
Edited by Geneviève Boucher