MCPcopy Index your code
hub / github.com/archlinux/archinstall / _append_log

Function _append_log

archinstall/lib/command.py:371–384  ·  view source on GitHub ↗
(file: str, content: str)

Source from the content-addressed store, hash-verified

369
370
371def _append_log(file: str, content: str) -> None:
372 path = logger.directory / file
373
374 change_perm = not path.exists()
375
376 try:
377 with path.open('a') as f:
378 f.write(content)
379
380 if change_perm:
381 path.chmod(stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP)
382 except PermissionError, FileNotFoundError:
383 # If the file does not exist, ignore the error
384 pass

Callers 2

_cmd_historyFunction · 0.85
_cmd_outputFunction · 0.85

Calls 2

existsMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected