This looks great. A minor style suggestion which you are free to ignore; changing the function signature to be
def get_ssl_context(verify=True):
would both enable keyword args and provide a sensible default. You'd need to change the condition inside the function to
if verify: <stuff> else: the non verify path
but I think it would make callsites of this function nicer to read.
« Back to merge proposal
This looks great. A minor style suggestion which you are free to ignore; changing the function signature to be
def get_ssl_ context( verify= True):
would both enable keyword args and provide a sensible default. You'd need to change the condition inside the function to
if verify:
<stuff>
else:
the non verify path
but I think it would make callsites of this function nicer to read.