Two men who tried and failed to steal a cash machine from a supermarket in Carlisle, Cumbria, were convicted within hours of the attempt.