dump plugin: add newline to file in inplace mode
The auto-generated lockfiles should be terminated with a newline to be POSIX compliant. Previously, this only worked for output via stdout but not for inplace operations. This is fixed by appending the newline to the active output target. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
e2bf6d74df
commit
471f5e58d2
@ -208,7 +208,7 @@ class Dump(Checkout):
|
|||||||
with IoTargetMonitor(output) as f:
|
with IoTargetMonitor(output) as f:
|
||||||
if args.format == 'json':
|
if args.format == 'json':
|
||||||
json.dump(config_expanded, f, indent=args.indent)
|
json.dump(config_expanded, f, indent=args.indent)
|
||||||
sys.stdout.write('\n')
|
f.write('\n')
|
||||||
elif args.format == 'yaml':
|
elif args.format == 'yaml':
|
||||||
yaml.dump(
|
yaml.dump(
|
||||||
config_expanded, f,
|
config_expanded, f,
|
||||||
|
Loading…
Reference in New Issue
Block a user