The provisions of Sections 31102 and 31103 shall not apply to any dog which is inside the corporate limits of any city, or city and county, or to any dog which is under the reasonable control of his owner or keeper, unless the dog is actually caught in the act or worrying, wounding, chasing, or killing any livestock or poultry.