From: Wido den Hollander Date: Tue, 12 Dec 2017 20:27:07 +0000 (+0100) Subject: ceph-volume: Add linesep/newline at end of JSON file when writing X-Git-Tag: wip-pdonnell-testing-20180317.202121~799^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=392603a881957f6e8cf03c29610e8878c53cff33;p=ceph-ci.git ceph-volume: Add linesep/newline at end of JSON file when writing Instead of: "systemd": "", "type": "bluestore", "whoami": "0" }root@alpha:~# A newline is added to the JSON file when writing: "type": "bluestore", "whoami": "0" } root@alpha:~# Makes it a bit easier to read the JSON files on a terminal Signed-off-by: Wido den Hollander --- diff --git a/src/ceph-volume/ceph_volume/devices/simple/scan.py b/src/ceph-volume/ceph_volume/devices/simple/scan.py index 905baf41588..80fec8a125c 100644 --- a/src/ceph-volume/ceph_volume/devices/simple/scan.py +++ b/src/ceph-volume/ceph_volume/devices/simple/scan.py @@ -129,6 +129,7 @@ class Scan(object): else: with open(json_path, 'w') as fp: json.dump(osd_metadata, fp, indent=4, sort_keys=True, ensure_ascii=False) + fp.write(os.linesep) terminal.success( 'OSD %s got scanned and metadata persisted to file: %s' % ( osd_id,