Skip to content

Commit

Permalink
Log machinery info in machinery.init()
Browse files Browse the repository at this point in the history
Now that we moved all Qt related things out of `qutebrowser.utils.log` we can import
`qutebrowser.utils.log` in `qutebrowser.qt.machinery`, and therefore move the machinery
log where it belongs.
  • Loading branch information
pylbrecht committed Jul 18, 2023
1 parent 2768df6 commit a962a36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion qutebrowser/misc/earlyinit.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ def init_log(args):
log.init_log(args)
qtlog.init(args)
log.init.debug("Log initialized.")
log.init.debug(str(machinery.INFO))


def check_optimize_flag():
Expand Down
3 changes: 3 additions & 0 deletions qutebrowser/qt/machinery.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import dataclasses
from typing import Optional, Dict

from qutebrowser.utils import log

# Packagers: Patch the line below to change the default wrapper for Qt 6 packages, e.g.:
# sed -i 's/_DEFAULT_WRAPPER = "PyQt5"/_DEFAULT_WRAPPER = "PyQt6"/' qutebrowser/qt/machinery.py
#
Expand Down Expand Up @@ -280,6 +282,7 @@ def init(args: argparse.Namespace) -> SelectionInfo:
info = _select_wrapper(args)
if info.wrapper is not None:
_set_globals(info)
log.init.debug(str(INFO))

Check warning on line 285 in qutebrowser/qt/machinery.py

View workflow job for this annotation

GitHub Actions / linters (flake8)

undefined name 'INFO'

# If info is None here (no Qt wrapper available), we'll show an error later
# in earlyinit.py.
Expand Down

0 comments on commit a962a36

Please sign in to comment.