Philipp Hörist pushed to branch master at gajim / gajim


Commits:
a422f065 by André Apitzsch at 2023-05-27T11:11:55+02:00
fix: ProfileWindow: Don't fail when no vcard is set

- - - - -


1 changed file:

- gajim/gtk/profile.py


Changes:

=====================================
gajim/gtk/profile.py
=====================================
@@ -185,9 +185,12 @@ def _on_access_model_received(self, task: Task) -> None:
 
     def _on_vcard_received(self, task: Task):
         try:
-            self._current_vcard = cast(VCard, task.finish())
+            self._current_vcard = cast(VCard | None, task.finish())
         except StanzaError as error:
             log.info('Error loading VCard: %s', error)
+            self._current_vcard = None
+
+        if self._current_vcard is None:
             self._current_vcard = VCard()
 
         self._load_avatar()



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/a422f0651d6a4ba5ba254103045e47c1275f39b3

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/a422f0651d6a4ba5ba254103045e47c1275f39b3
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to