I guess it depends what's wrong with it and how many hours it has on it. If it's a typical RV generator, it's pretty close to brand new already in terms of hours of use. (Onans will run for thousands of hours generally if taken care of and used that much.) If all it needs is a replacement carburetor and general cleanup and maybe some other minor parts, then I think it's well worth doing over replacing. If it has a damaged crankshaft or generator head that needs replacement, that may well be a different story.
My guess is that a bit of carburetor work and adjustment and maybe cleaning the slip rings will make it work properly. That's purely a guess, of course; I'm not a long-distance generator clairvoyant by any means!