forked from Mirror/pmbootstrap
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:
parent
fce06843fc
commit
95d68d8854
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
||||||
import pmb.config
|
import pmb.config
|
||||||
from pmb.core.context import Context
|
from pmb.core.context import Context
|
||||||
from pmb.core.pkgrepo import pkgrepo_default_path
|
from pmb.core.pkgrepo import pkgrepo_default_path
|
||||||
|
from pmb.helpers import logging
|
||||||
from pmb.types import PmbArgs
|
from pmb.types import PmbArgs
|
||||||
import pmb.helpers.git
|
import pmb.helpers.git
|
||||||
import pmb.helpers.args
|
import pmb.helpers.args
|
||||||
|
@ -159,6 +160,6 @@ def init(args: PmbArgs) -> PmbArgs:
|
||||||
def please_i_really_need_args() -> PmbArgs:
|
def please_i_really_need_args() -> PmbArgs:
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
traceback.print_stack()
|
traceback.print_stack(file=logging.logfd)
|
||||||
print("FIXME: retrieved args where it shouldn't be needed!")
|
logging.warning("FIXME: retrieved args where it shouldn't be needed!")
|
||||||
return __args
|
return __args
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue