He has been spared jail.