I believe its very possible that he knew you were helping him. I always have felt like im one of those people who is "good" with animals. Idk, i cant really explain it but i feel like whenever i help one or handle it they know that im helping and/or not a threat. Except for the chipmunks in my garden, Im known to them as the grim reaper lol!
Sorta just how i feel, but im sure someones gunna come on here and say snakes have no emotions. They feel hunger and horny, thats it. They are most likely correct, im not saying theyre wrong, but i still have my own opinion...