diff options
author | wurstsalat <mailtrash@posteo.de> | 2021-02-14 17:19:07 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2021-02-27 14:54:10 +0300 |
commit | eb71b81ed8d651f3a0e80d1fcceb6d721c7ed882 (patch) | |
tree | 8580583c407e98d4e5543d1a6dabf0c02c2edc56 | |
parent | c3578713c76d857f7fda286304e74a5757762416 (diff) |
VcardWindow: Fix resource string if resource is missing
Fixes: #10273
-rw-r--r-- | gajim/vcard.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gajim/vcard.py b/gajim/vcard.py index abab96c6d..3e048d53c 100644 --- a/gajim/vcard.py +++ b/gajim/vcard.py @@ -398,10 +398,13 @@ class VcardWindow(EventHelper): tt_text = _("There is no pending subscription request.") ask_label.set_tooltip_text(tt_text) - resources = '%s (%s)' % (self.contact.resource, str( - self.contact.priority)) - uf_resources = self.contact.resource + _(' resource with priority ')\ - + str(self.contact.priority) + resources = '' + uf_resources = '' + if self.contact.resource: + resources = '%s (%s)' % (self.contact.resource, str( + self.contact.priority)) + uf_resources = self.contact.resource + _(' resource with priority ')\ + + str(self.contact.priority) if not self.contact.status: self.contact.status = '' |