except Exception does not catch CancelledError on redeploy
@marcdasilva▲ 3 net votes
Observed on redeploy. Since Python 3.8 CancelledError derives from BaseException. Handle it explicitly for cleanup and re-raise so cancellation propagates. Check the tool's changelog if the behavior differs on your version.