def load(self): """ Load all accounts from the configuration. The accounts will not be started until the start method is called. """ configuration = ConfigurationManager() bonjour_account = BonjourAccount() names = configuration.get_names([Account.__group__]) [Account(id) for id in names if id != bonjour_account.id] default_account = self.default_account if default_account is None or not default_account.enabled: try: self.default_account = (account for account in self.accounts.itervalues() if account.enabled).next() except StopIteration: self.default_account = None
def load(self): """ Load all accounts from the configuration. The accounts will not be started until the start method is called. """ configuration = ConfigurationManager() bonjour_account = BonjourAccount() names = configuration.get_names([Account.__group__]) [Account(id) for id in names if id != bonjour_account.id] default_account = self.default_account if default_account is None or not default_account.enabled: try: self.default_account = next( (account for account in list(self.accounts.values()) if account.enabled)) except StopIteration: self.default_account = None
def load(self): """ Load all accounts from the configuration. The accounts will not be started until the start method is called. """ notification_center = NotificationCenter() configuration = ConfigurationManager() bonjour_account = BonjourAccount() names = configuration.get_names([Account.__group__]) [Account(id) for id in names if id != bonjour_account.id] default_account = self.default_account notification_center.post_notification( 'SIPAccountManagerDidLoad', sender=self, data=NotificationData(accounts=names, default_account=default_account)) if default_account is None or not default_account.enabled: try: self.default_account = next( (account for account in list(self.accounts.values()) if account.enabled)) except StopIteration: self.default_account = None
def load(self): configuration = ConfigurationManager() [VirtualGroup(id=id) for id in configuration.get_names(VirtualGroup.__key__)]
def load(self): configuration = ConfigurationManager() [ VirtualGroup(id=id) for id in configuration.get_names(VirtualGroup.__key__) ]