MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / load_or_create_master_key

Function load_or_create_master_key

Scripts/ButSystem.py:414–437  ·  view source on GitHub ↗

load_or_create_master_key. Internal helper function. This docstring was added automatically to improve maintainability. Returns: Varies.

()

Source from the content-addressed store, hash-verified

412DEVICE_ID = load_or_create_device_id()
413
414
415logging.basicConfig(
416 filename=LOG_PATH,
417 level=logging.INFO,
418 format="%(asctime)s %(levelname)s %(message)s",
419)
420log = logging.getLogger("butsystem")
421
422_TERMUX_ERROR_LOCK = threading.RLock()
423_TERMUX_ERROR_BUFFER = []
424_TERMUX_ERROR_MONITOR_ACTIVE = False
425
426
427class _TermuxErrorBufferHandler(logging.Handler):
428 """Buffer startup errors and print future errors beneath the link block."""
429
430 def __init__(self):
431 super().__init__(level=logging.ERROR)
432 self.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(name)s: %(message)s"))
433
434 def emit(self, record):
435 try:
436 rendered = self.format(record)
437 if record.exc_info:
438 rendered += "\n" + "".join(traceback.format_exception(*record.exc_info)).rstrip()
439 with _TERMUX_ERROR_LOCK:
440 if _TERMUX_ERROR_MONITOR_ACTIVE:

Callers 1

ButSystem.pyFile · 0.70

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected