Homeowner shoots possible attacker while walking dog