From Plutarch's Life of Solon
(paragraph break added):
[Anacharsis] laughed at [Solon] for imagining the dishonesty and covetousness of his countrymen could be restrained by written laws, which were like spiders' webs, and would catch, it is true, the weak and poor, but easily be broken by the mighty and rich.
To this Solon rejoined that men keep their promises when neither side can get anything by the breaking of them; and he would so fit his laws to the citizens, that all should understand it was more eligible to be just than to break the laws. But the event rather agreed with the conjecture of Anacharsis than Solon's hope.
Thanks to my colleague and former teacher Bill McGovern for the pointer.