Glad to hear the little guy isnt to badly hurt and recovery seems like it should be fast. We had a similar situation with our Dog and the snake mostly she just wanted to see what it was and was bumping the enclosure etc. So what we did was fill an extra spray bottle with water and any time we saw her close the dog got a quick squirt. And it worked great now she leaves the enclosure alone and is fine around the snake. Hope this help prevent this again or gives you an idea of how to prevent it.
Robie