Implement the change in behaviour mentioned in the previous commit
This commit is contained in:
parent
31c11de2af
commit
a4141cfa2e
1 changed files with 2 additions and 2 deletions
|
@ -309,9 +309,9 @@ def present(module, dest, regexp, line, insertafter, insertbefore, create,
|
|||
if not b_new_line.endswith(b_linesep):
|
||||
b_new_line += b_linesep
|
||||
|
||||
# If no regexp was given and a line match is found anywhere in the file,
|
||||
# If no regexp was given and no line match is found anywhere in the file,
|
||||
# insert the line appropriately if using insertbefore or insertafter
|
||||
if regexp is None and m:
|
||||
if regexp is None and m is None:
|
||||
|
||||
# Insert lines
|
||||
if insertafter and insertafter != 'EOF':
|
||||
|
|
Loading…
Add table
Reference in a new issue