A former Dunedin mayoral candidate was ''fortunate'' to have avoided prison after admitting a theft from a cafe he once owned.