[Fuego] [PATCH 2/8] ftc: Use text mode in file operation to make compatible with python3
[email protected] Wed, 20 Apr 2022 15:41:34 +0530
| Newsgroups | dev.linux.lists.fuego |
|---|---|
| Message-ID | <[email protected]> |
From: sireesha <[email protected]> In python 2 the str type can be used for both text an binary data, and it works well even the file is opened in binary mode. Whereas in python 3 it has made the text and binary data in distinct types, so use text mode that supports both in python 2 and 3 Signed-off-by: sireesha <[email protected]> Signed-off-by: venkata pyla <[email protected]> --- scripts/ftc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ftc b/scripts/ftc index 3d61c4b..ce34b08 100755 --- a/scripts/ftc +++ b/scripts/ftc @@ -2974,7 +2974,7 @@ def gen_csv_report(header_data, report_data, report_file): import csv # generate header - with open(report_file, "wb") as report: + with open(report_file, "w") as report: writer = csv.writer(report) writer.writerows(header_data) -- 2.20.1