core: move args.log to context.log (MR 2252)

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-05-24 18:19:07 +02:00 committed by Oliver Smith
parent 838beb270d
commit 02f04ba3a8
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
6 changed files with 28 additions and 15 deletions

View file

@ -3,13 +3,20 @@
"""Global runtime context"""
import pmb.config
from pathlib import Path
class Context():
details_to_stdout: bool
quiet: bool
command_timeout: float
sudo_timer: bool
log: Path
def __init__(self):
self.details_to_stdout = False
self.command_timeout = 0
self.sudo_timer = False
self.log = pmb.config.work / "log.txt"
self.quiet = False