Via Nate Silver, this is a pretty great indicator:
among 26 congressmen NOT running for re-election (almost all of whom are Republicans), 23 voted in favor of the bill, as opposed to 2 against and one abstaining.
Update: Eve has slightly different numbers below; but you get the idea.
And, yes, a lot of members in safe seats voted against the bill, too. Although in some cases I wonder whether they might worry that the definition of "safe" could change on a dime.
I should add that I fully believe many of the no votes came from people with real substantive revulsion towards the bill. But clearly politics played a major role here--maybe not partisanship, but fear of the voters for sure.