aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_master.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-09-19 15:55:53 +0200
committerBjörn Gustavsson <[email protected]>2012-09-20 11:09:40 +0200
commita0c65862e8beaca2d2c0b9d6d13eca862641994c (patch)
tree18097ae906fc648bf05298ea35da57d8c2054dd9 /lib/common_test/src/ct_master.erl
parentc24f87e19cc01437c3c7b84e9c3fbeceb8c3b736 (diff)
downloadotp-a0c65862e8beaca2d2c0b9d6d13eca862641994c.tar.gz
otp-a0c65862e8beaca2d2c0b9d6d13eca862641994c.tar.bz2
otp-a0c65862e8beaca2d2c0b9d6d13eca862641994c.zip
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.
Diffstat (limited to 'lib/common_test/src/ct_master.erl')
-rw-r--r--lib/common_test/src/ct_master.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_master.erl b/lib/common_test/src/ct_master.erl
index 042c5ba267..99bec3ea09 100644
--- a/lib/common_test/src/ct_master.erl
+++ b/lib/common_test/src/ct_master.erl
@@ -696,8 +696,9 @@ status(MasterPid,Event) ->
log(To,Heading,Str,Args) ->
if To == all ; To == tty ->
- Str1 = ["=== ",Heading," ===\n",io_lib:format(Str,Args),"\n"],
- io:format(Str1,[]);
+ Chars = ["=== ",Heading," ===\n",
+ io_lib:format(Str,Args),"\n"],
+ io:put_chars(Chars);
true ->
ok
end,