There is some truth in the effects of influence from the company you keep.  There are two ways those close associations go; either you influence those around you or they influence you.  What’s the problem with that?  Nothing—unless those influences are negative.  Don’t be around those people and take on the burden of their complaints about the circumstance that they face and can’t control.  Instead, take your own path and control the things you can control.