1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

helpers: args: improve please_i_really_need_args() logging (MR 2344)

dumping a stack trace directly to the console is not nice, keep it to
the log file.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-07-02 14:26:31 +02:00
parent fce06843fc
commit 95d68d8854
No known key found for this signature in database
GPG key ID: 0583312B195F64B6

View file

@ -3,6 +3,7 @@
import pmb.config
from pmb.core.context import Context
from pmb.core.pkgrepo import pkgrepo_default_path
from pmb.helpers import logging
from pmb.types import PmbArgs
import pmb.helpers.git
import pmb.helpers.args
@ -159,6 +160,6 @@ def init(args: PmbArgs) -> PmbArgs:
def please_i_really_need_args() -> PmbArgs:
import traceback
traceback.print_stack()
print("FIXME: retrieved args where it shouldn't be needed!")
traceback.print_stack(file=logging.logfd)
logging.warning("FIXME: retrieved args where it shouldn't be needed!")
return __args