Mata Hari, was an adventuress, for lack of a better word. She may well have been a spy, though there is some doubt. If she did do it, it was not from any sense of conviction, but for money or she was using or being used by her lovers.
You may agree with Le Carre that Mata Hari was materialist, etc and therefor not a spy but the French killed her just the same.