From 71b1ebcdffdf48a001712475e7b706f260dbc841 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Fri, 3 Jan 2020 16:36:18 +0800 Subject: [PATCH] refactor: remove unused code --- httprunner/utils.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/httprunner/utils.py b/httprunner/utils.py index 53d1e15c..4d0aab86 100644 --- a/httprunner/utils.py +++ b/httprunner/utils.py @@ -383,18 +383,11 @@ def create_scaffold(project_name): logger.color_print(msg, "BLUE") def create_file(path, file_content=""): - with open(path, 'w') as f: + with open(path, 'w', encoding='utf-8') as f: f.write(file_content) msg = "created file: {}".format(path) logger.color_print(msg, "BLUE") - def create_path(path, ptype, file_content=""): - if ptype == "folder": - os.makedirs(path) - elif ptype == "file": - with open(path, 'w') as f: - f.write(file_content) - demo_api_content = """ name: demo api variables: