From 34baafd3d7a7d32bc7a3a4c519071de6355d0351 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Fri, 8 Jul 2016 15:25:54 +0300 Subject: Tests: fix config creation error handling --- test/test_environment.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test_environment.lua b/test/test_environment.lua index 1edf3987..9f22e701 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua @@ -198,8 +198,7 @@ end -- @param config_path string: path where to save config file -- @param config_content string: content of this config file local function create_config(config_path, config_content) - local file, err = io.open(config_path, "w+") - if not file then return nil, err end + local file = assert(io.open(config_path, "w")) file:write(config_content) file:close() end -- cgit v1.2.3-55-g6feb