MCPcopy Create free account
hub / github.com/bugy/script-server / _ensure_file_open

Method _ensure_file_open

src/execution/logging.py:40–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38 self.output_stream.subscribe(self)
39
40 def _ensure_file_open(self):
41 if self.opened:
42 return
43
44 try:
45 self.log_file = open(self.log_file_path, 'wb')
46 except:
47 LOGGER.exception("Couldn't create a log file")
48
49 self.opened = True
50
51 def __log(self, text):
52 if not self.opened:

Callers 2

startMethod · 0.95
write_lineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected