Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-08-21 12:29:53 +0300
committerlovetox <philipp@hoerist.com>2022-08-21 12:29:53 +0300
commitae699c18307a30b75cbdeca936dd5c47f64ed6da (patch)
treee0d8ae8c77d6dbdc6d8373352c3eac38c242ec89
parent12669c512656b01180a2871f5a8f1b1e8b115687 (diff)
refactor: ChatBanner: Use asserts instead of return
There is no case where client or contact should be None
-rw-r--r--gajim/gtk/chat_banner.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gajim/gtk/chat_banner.py b/gajim/gtk/chat_banner.py
index 1166080fe..a6d48ed31 100644
--- a/gajim/gtk/chat_banner.py
+++ b/gajim/gtk/chat_banner.py
@@ -240,8 +240,8 @@ class ChatBanner(Gtk.Box, EventHelper):
self._ui.avatar_image.set_from_surface(surface)
def _update_content(self) -> None:
- if self._client is None or self._contact is None:
- return
+ assert self._contact is not None
+ assert self._client is not None
name = self._contact.name