diff --git a/common/file.py b/common/file.py index 65251aab198e72b77cf142eca3b1c113a4cacddb..c2a21344b59cafe474210ec3b186961257b7ef28 100644 --- a/common/file.py +++ b/common/file.py @@ -19,3 +19,18 @@ class FileOperation: # os.mkdir(Config.get_output_path() + file_name) file = open(Config.get_output_path() + file_name,'w') file.close() + + @staticmethod + def wrap_output_format(cmd_name, data, split): + ''' + wrap file format to data , use --- or === split and return + do not write file + ''' + out = 'Command: ' + cmd_name + '\nSubCommand: ' + data + if split == '=': + out = out + "=========================kylin=========================\n" + else: + out = out + "-------------------------kylin-------------------------\n" + + return out + \ No newline at end of file