Acts which but for this section constitute assaults are lawful if they amount to use of reasonable force in exercise of a right in accordance with the provisions of section 39 of this Code.