Depends on what the mountain lion was doing. If it attacked you/livestock, then yes, you could probably shoot it under the idea of it being a danger to humans/livestock. You'd have to call the game warden afterwards.
if it was attacking you you could kill it and it would be understandable, but if it was just cutting thru your yard minding its own business like the rattle was doing and you killed it youd be in some trouble
"So far this is the oldest that I've been"
'If you can make it through the nite, there's a brighter day'
"I'm out the game, put the 2nd string in."
"live with the pain and keep trying or die knowing you never gave anything a chance"
"Death is not the greatest loss in life. The greatest loss is what dies inside while still alive"
"No one can take away your dreams"