From 049d7747c647bbb7ad608562d42b172a95f55e4e Mon Sep 17 00:00:00 2001 From: Chris Abella Date: Fri, 18 Dec 2020 17:15:46 -0500 Subject: [PATCH] sunburst_detect.py: Reduce file write buffer, write file with utf-8 encoding --- sunburst/sunburst_detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sunburst/sunburst_detect.py b/sunburst/sunburst_detect.py index ab14512..2ec9367 100644 --- a/sunburst/sunburst_detect.py +++ b/sunburst/sunburst_detect.py @@ -594,7 +594,7 @@ def main(): device_oids = get_all_active_devices(args) print(f"Querying against {len(device_oids)} devices") - with open(args.output, "w") as csvfile: + with open(args.output, "w", encoding="utf-8", buffering=1) as csvfile: w = csv.DictWriter( csvfile, fieldnames=[