If a function doesn’t specify a return value, it returns None
.
In an if/then conditional statement, None
evaluates to False. So in theory you could check the return value of this function for success/failure. I say “in theory” because for the code in this question, the function does not catch or handle exceptions and may require additional hardening.