It's not showing in this diff, but you don't need like 223: except AttributeError:

Publish conduits always have the get_repo_scratchpad method, and if they don't, you're inadvertently quieting a serious bug.