summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruser202729 <25191436+user202729@users.noreply.github.com>2021-05-19 09:07:09 +0700
committeruser202729 <25191436+user202729@users.noreply.github.com>2021-05-19 09:07:09 +0700
commit502832ac1989858fe98bd8b874ff92e6404180ad (patch)
treec5f212d56005e2de22343b6058b9066cf53c62dd
parent06e49efd3d9f21058893a0c3751aa05caaf0e2f8 (diff)
downloadqutebrowser-502832ac1989858fe98bd8b874ff92e6404180ad.tar.gz
qutebrowser-502832ac1989858fe98bd8b874ff92e6404180ad.zip
Move function call with side effect out of assertion to avoid error when assertions are disabled
-rw-r--r--qutebrowser/browser/webengine/notification.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qutebrowser/browser/webengine/notification.py b/qutebrowser/browser/webengine/notification.py
index 50f73fca4..d8387e6d4 100644
--- a/qutebrowser/browser/webengine/notification.py
+++ b/qutebrowser/browser/webengine/notification.py
@@ -669,7 +669,8 @@ class _ServerCapabilities:
def _as_uint32(x: int) -> QVariant:
"""Convert the given int to an uint32 for DBus."""
variant = QVariant(x)
- assert variant.convert(QVariant.UInt)
+ successful = variant.convert(QVariant.UInt)
+ assert successful
return variant