If dealing with peer or higher-level "politicians" - I refuse to play their game, even if beneficiary to me at the time. While I simultaneously point out any transgressions of theirs. Sooner than later they screw up - since focusing on politics instead of your work is actually pretty hard work.
If dealing with subordinates. I perform "face thy accusor" ritual. It also helps not to get engaged into any of their schemes - thus preserving one's integrity.
Oh and both approaches require that you be valuable to the team - else you will get ground and ejected :)