|
|
@ -348,7 +348,11 @@ def main():
|
|
|
|
if ins_bef is None and ins_aft is None:
|
|
|
|
if ins_bef is None and ins_aft is None:
|
|
|
|
ins_aft = 'EOF'
|
|
|
|
ins_aft = 'EOF'
|
|
|
|
|
|
|
|
|
|
|
|
present(module, dest, params['regexp'], params['line'],
|
|
|
|
# Replace the newline character with an actual newline. Don't replace
|
|
|
|
|
|
|
|
# escaped \\n, hence sub and not str.replace.
|
|
|
|
|
|
|
|
line = re.sub(r'\n', os.linesep, params['line'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
present(module, dest, params['regexp'], line,
|
|
|
|
ins_aft, ins_bef, create, backup, backrefs)
|
|
|
|
ins_aft, ins_bef, create, backup, backrefs)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if params['regexp'] is None and params.get('line', None) is None:
|
|
|
|
if params['regexp'] is None and params.get('line', None) is None:
|
|
|
|