Gandhi was an opportunist, but even saints have feet of clay.
He frankly admitted that his non-violent protest worked against the decent and civilized British, but wouldn't have worked against brutal non-western societies; that the Japanese for example would have killed him with no thought or remorse.
It was sort of like the Bostonian Drunkard's "speaking truth to power" nonsense during the Bush administration; with some opponents, if decent and civilized, there are no consequences to shooting off one's mouth, and so it takes no courage.