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


Commits:
732d381a by Philipp Hörist at 2023-05-27T09:41:05+02:00
fix: ContactInfo: Don’t fail when no vcard is set

- - - - -


1 changed file:

- gajim/gtk/contact_info.py


Changes:

=====================================
gajim/gtk/contact_info.py
=====================================
@@ -303,9 +303,12 @@ def _query_device(self, contact: ResourceContact) -> None:
 
     def _on_vcard_received(self, task: Task) -> None:
         try:
-            vcard = cast(VCard, task.finish())
+            vcard = cast(VCard | None, task.finish())
         except StanzaError as err:
             log.info('Error loading VCard: %s', err)
+            vcard = None
+
+        if vcard is None:
             vcard = VCard()
 
         self._vcard_grid.set_vcard(vcard)



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

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/732d381aa489674d5b5c2606e9d7e36e1f256a25
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