241b83d installutils: refactor set_directive

1 file Authored by ftweedal 6 years ago, Committed by cheimes 6 years ago,
    installutils: refactor set_directive
    
    To separate concerns and make it easier to test set_directive,
    extract function ``set_directive_lines`` to do the line-wise
    search/replace, leaving ``set_directive`` to deal with the file
    handling.
    
    Part of: https://pagure.io/freeipa/issue/7288
    
    Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>