MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / __init__

Method __init__

client/util/zipmgr.py:31–44  ·  view source on GitHub ↗

检查工具的存在与是否可用

(self)

Source from the content-addressed store, hash-verified

29
30class Zip(object):
31 def __init__(self):
32 """
33 检查工具的存在与是否可用
34 """
35 # logger.info("初始化zip模块中...")
36 if not os.environ.get(ZIP_HOME, False):
37 raise NodeConfigError("the node does not have ZIP tool, please check.")
38 self.ZIP_TOOL_NAME = "7z"
39 if platform.platform().find("debian") >= 0:
40 logger.info("platform: %s" % platform.platform())
41 logger.info(
42 "检测到在ubuntu系统中调用zip,因此将调用7z_ubuntu。(7z_ubuntu可能存在兼容问题,如果异常,请自行安装:sudo apt-get install p7zip-full)"
43 )
44 self.ZIP_TOOL_NAME = "7z_ubuntu"
45
46 def compress(self, path, zip_file):
47 """

Callers

nothing calls this directly

Calls 3

NodeConfigErrorClass · 0.90
getMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected