Sir John Thomas sitting at the High Court ruled that the two men were in breach of the injunction and therefore in contempt of court.
Reflecting on the "gravity" of their offence he said they would be given nine months imprisonment but because of mitigating circumstances it would be suspended.
More top news
Once a fringe party, the SNP has become a thundering political juggernaut that shows no sign of slowing down.
Turning cooler and more unsettled this week, as a low pressure system dominates our weather.