MCPcopy Create free account
hub / github.com/apache/cloudstack / deleteLine

Method deleteLine

systemvm/debian/opt/cloud/bin/cs/CsFile.py:164–174  ·  view source on GitHub ↗
(self, search)

Source from the content-addressed store, hash-verified

162 return found
163
164 def deleteLine(self, search):
165 found = False
166 logging.debug("Searching for %s to remove the line " % search)
167 temp_config = []
168 for index, line in enumerate(self.new_config):
169 if line.lstrip().startswith("#"):
170 continue
171 if search not in line:
172 temp_config.append(line)
173
174 self.new_config = list(temp_config)
175
176 def compare(self, o):
177 result = (isinstance(o, self.__class__) and self.config == o.config)

Callers 2

del_l2tp_ipsec_userMethod · 0.95

Calls 2

debugMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected