diff cagou/core/common_widgets.py @ 312:772c170b47a9

Python3 port: /!\ Cagou now runs with Python 3.6+ Port has been done in the same way as for backend (check backend commit b2d067339de3 message for details).
author Goffi <goffi@goffi.org>
date Tue, 13 Aug 2019 19:14:22 +0200
parents 1b835bcfa663
children 4374cb741eb5
line wrap: on
line diff
--- a/cagou/core/common_widgets.py	Mon Aug 05 11:21:54 2019 +0200
+++ b/cagou/core/common_widgets.py	Tue Aug 13 19:14:22 2019 +0200
@@ -53,7 +53,7 @@
 
     @property
     def name(self):
-        return self.identities.values()[0].values()[0][0]
+        return list(self.identities.values())[0].values()[0][0]
 
 
 class ItemWidget(TouchMenuItemBehaviour, BoxLayout):
@@ -66,14 +66,14 @@
     def __init__(self, main_wid, entity_jid, identities, **kw):
         self.entity_jid = entity_jid
         self.identities = identities
-        own_jid = next(G.host.profiles.itervalues()).whoami
+        own_jid = next(iter(G.host.profiles.values())).whoami
         self.own_device = entity_jid.bare == own_jid
         if self.own_device:
             name = self.identities.name
         elif self.entity_jid.node:
             name = self.entity_jid.node
         elif self.entity_jid == own_jid.domain:
-            name = _(u"your server")
+            name = _("your server")
         else:
             name = entity_jid