return in finally swallows exceptions
In https://github.com/jborean93/pypsrp/blob/d2a3eca257230e40354d39ca008639992f8495a4/src/psrp/_connection/wsman.py#L746 there is a return statement in a finally block, which would swallow any in-flight exception.
and
https://github.com/jborean93/pypsrp/blob/d2a3eca257230e40354d39ca008639992f8495a4/src/psrp/_connection/wsman.py#L1110
This means that if a BaseException (such as KeyboardInterrupt) is raised from the try body, or any exception is raised from an except: clause, it will not propagate on as expected.
See also https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.
Thanks for the information, it's certainly somewhat surprising but I can understand why it is happening and will have to update the code.