Calm, let him be for a few days and give him a chance to settle. I am guessing it is a young snake and perhaps has fed only a few times with you or not at all. Time and security make sure he has hides and maybe some over head cover fake plants work wonders for this and peace and quiet. Sheds seem to be a lot of work for snakes and sometimes they get cranky give him some peace and quiet for a few days and a meal then a day or two later see what he is like.