diff --git a/confluent_client/bin/nodesensors b/confluent_client/bin/nodesensors index f9c544c6..3044a930 100755 --- a/confluent_client/bin/nodesensors +++ b/confluent_client/bin/nodesensors @@ -32,6 +32,13 @@ path = os.path.realpath(os.path.join(path, '..', 'lib', 'python')) if path.startswith('/opt'): sys.path.append(path) + +class hybridcsv(csv.excel): + lineterminator = '\n' + + +csv.register_dialect('hybrid', hybridcsv) + import confluent.client as client sensorcollections = { @@ -209,7 +216,7 @@ def main(): headernames.append(headername) if options.csv: linebyline = False - csvwriter = csv.writer(sys.stdout) + csvwriter = csv.writer(sys.stdout, dialect='hybrid') if options.interval: csvwriter.writerow(['time', 'node'] + headernames) else: