summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-03-26 10:43:03 +0100
committerFlorian Bruhin <me@the-compiler.org>2022-03-26 10:44:14 +0100
commitcedc3d2f28ed312520b4138acda88f6a0856dc90 (patch)
tree94dfd4d4b3bdecb5ce4008b30d56f213574ace12
parent0a835ecd926cc334f5f0347e6d0b809dcfd86d0f (diff)
downloadqutebrowser-cedc3d2f28ed312520b4138acda88f6a0856dc90.tar.gz
qutebrowser-cedc3d2f28ed312520b4138acda88f6a0856dc90.zip
Minor style changes
-rw-r--r--qutebrowser/misc/debugcachestats.py2
-rw-r--r--qutebrowser/misc/utilcmds.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/qutebrowser/misc/debugcachestats.py b/qutebrowser/misc/debugcachestats.py
index a682b53d1..9090bd0ea 100644
--- a/qutebrowser/misc/debugcachestats.py
+++ b/qutebrowser/misc/debugcachestats.py
@@ -43,7 +43,7 @@ def register(name: Optional[str] = None) -> Callable[[_T], _T]:
fn_name = fn.__name__ if name is None else name
if sys.version_info < (3, 9):
log.misc.vdebug( # type: ignore[attr-defined]
- 'debugcachestats not supported on python < 3.9, not adding \'%s\'',
+ "debugcachestats not supported on python < 3.9, not adding '%s'",
fn_name,
)
return fn
diff --git a/qutebrowser/misc/utilcmds.py b/qutebrowser/misc/utilcmds.py
index da774379f..486ca7a1d 100644
--- a/qutebrowser/misc/utilcmds.py
+++ b/qutebrowser/misc/utilcmds.py
@@ -127,9 +127,8 @@ def debug_all_objects() -> None:
def debug_cache_stats() -> None:
"""Print LRU cache stats."""
if sys.version_info < (3, 9):
- message.error('debugcachestats not supported on python < 3.9')
- else:
- debugcachestats.debug_cache_stats()
+ raise cmdutils.CommandError('debugcachestats not supported on python < 3.9')
+ debugcachestats.debug_cache_stats()
@cmdutils.register(debug=True)