> If it had succeeded, they would have got a military dictatorship
That's usually not how these things go in Turkey. In 1997, there was a non-violent military coup because of a situation very similar to what we've seen with Erdogan. A few months later, I spent the summer in Istanbul, drinking beer, discussing any and all politics with Turks, and chasing Turkish girls in a decidedly open and free environment. Most Turks I spoke to (admittedly tended to be secular) were quite glad that the coup had taken place and that the Islamist Party (Refah, or "Welfare" Party) was subsequently banned.
Incidentally, at the time the Refah party was banned, Erdogan was an active, up-and-coming party member.
In any case, few of the military coups that have occurred in modern Turkish history have been violent (1980 was significant exception) and none have resulted in a long-term dictatorship (1980 resulted in a 3-year military dictatorship).
Ironically, since 1980, it has been democracy, not military intervention, that has now permitted a dictatorship to gain a foothold in Turkey.