Niccolò Machiavelli said this quote

For no man is found so prudent as to know how to adapt himself to these changes, both because he cannot deviate from the course to which nature inclines him, and because, having always prospered while adhering to one path, he cannot be persuaded that it would be well for him to forsake it. And so when occasion requires the cautious man to act impetuously, he cannot do so and is undone: whereas had he changed his nature with time and circumstances, his fortune would have been unchanged.