Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
0846e172 by nicoco at 2025-09-26T16:04:55+02:00
fix: Leave text condition in place in CommonError.get_text()
This side effect was most likely a mistake, as:
- it is inconsistent with the other paths, e.g., when the pref_lang is
available;
- a get_xxx() method having a side effect is generally not what one expects.
- - - - -
1 changed file:
- nbxmpp/structs.py
Changes:
=====================================
nbxmpp/structs.py
=====================================
@@ -876,7 +876,7 @@ class CommonError:
text = self._text.get(None)
if text is not None:
return text
- return self._text.popitem()[1]
+ return next(iter(self._text.values()))
return ""
def set_text(self, lang: str, text: str) -> None:
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0846e1729815b8c62d1a52877842aad9fae0fd6c
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0846e1729815b8c62d1a52877842aad9fae0fd6c
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]