From a0c65862e8beaca2d2c0b9d6d13eca862641994c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 19 Sep 2012 15:55:53 +0200 Subject: common_test: Don't use undocumented features of io:format() The Format string argument for io:format() is not documented to accept an iolist, so we should not depend on it. Also, it is bad practice to use an arbitrary string as a format string for io:format(), since it could contain a '~' character which could trigger a badarg exception. Fix both problems at the same time by using io:put_chars() to display the iolist. --- lib/common_test/src/ct_master_logs.erl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/common_test/src/ct_master_logs.erl') diff --git a/lib/common_test/src/ct_master_logs.erl b/lib/common_test/src/ct_master_logs.erl index 9e61d5b16f..1e65337241 100644 --- a/lib/common_test/src/ct_master_logs.erl +++ b/lib/common_test/src/ct_master_logs.erl @@ -204,7 +204,7 @@ open_ct_master_log(Dir) -> {ok,Fd} = file:open(FullName,[write]), io:format(Fd,header("Common Test Master Log", {[],[1,2],[]}),[]), %% maybe add config info here later - io:format(Fd, config_table([]), []), + io:put_chars(config_table([])), io:format(Fd, "