Пример #1
0
 def GetNode(self):
     """
     Get the object representing the node (i.e. ourselves).
     """
     node = Entity()
     node.pseudo = self.pseudo
     # Dummy value to avoid None-marshaling
     node.address = Address()
     # Test data
     for s in self.services:
         node.AddService(s)
     return node
Пример #2
0
 def GetNode(self):
     """
     Get the object representing the node (i.e. ourselves).
     """
     node = Entity()
     node.pseudo = self.pseudo
     lang_code = wx.Locale.GetLanguageInfo(wx.Locale.GetSystemLanguage()).CanonicalName
     if lang_code:
         node.languages = [ str(lang_code.split('_')[0]) ]
     # Dummy value to avoid None-marshaling
     node.address = Address()
     # Test data
     for s in self.services:
         node.AddService(s)
     return node