Man earns 14-month jail term for racist attack