This is actually good advice. Any marriage that cannot survive political disagreements between the two partners is not bound to be a good one. Better if both parties just go there own separate ways.
You misunderstand. If your spouse is crazy enough to divorce you because you are a Republican, then good riddance to them. If someone is willing to throw away a partnership because of political ideology, their is no way that partnership is going to stand up against the rotors of life. It was a doomed union, and you are both better off without each other.