You could nest it inside the first if condition since if success is False/None it will not enter the condition either way. You can save 1 condition check. Not a big deal though.