MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / format

Method format

class/projectModel/javaModel.py:863–879  ·  view source on GitHub ↗

@name 格式化配置文件 @author lkq<2021-08-27> @param em @param level

(self, em, level=0)

Source from the content-addressed store, hash-verified

861 return ''
862
863 def format(self, em, level=0):
864 ''&#x27;
865 @name 格式化配置文件
866 @author lkq<2021-08-27>
867 @param em<string>
868 @param level<int>
869 ''&#x27;
870 i = "\n" + level * " "
871 if len(em):
872 if not em.text or not em.text.strip():
873 em.text = i + " "
874 for e in em:
875 self.format(e, level + 1)
876 if not e.tail or not e.tail.strip():
877 e.tail = i
878 if level and (not em.tail or not em.tail.strip()):
879 em.tail = i
880
881 # 保存配置
882 def save_tomcat(self):

Callers 15

save_tomcatMethod · 0.95
check_dbFunction · 0.45
bytes_to_human_readableFunction · 0.45
log_dockerFunction · 0.45
docker_confFunction · 0.45
renameFunction · 0.45
__init__Method · 0.45
get_ws_logMethod · 0.45
run_cmdMethod · 0.45
add_groupMethod · 0.45
update_groupMethod · 0.45
del_groupMethod · 0.45

Calls

no outgoing calls

Tested by 11

test_runMethod · 0.36
test_run_cmdMethod · 0.36
test_commitMethod · 0.36
test_exportMethod · 0.36
test_alarm_sendMethod · 0.36
test_fileMethod · 0.36
test_triggerMethod · 0.36
test_scriptMethod · 0.36
test_mysql_connectionMethod · 0.36