Mercurial > libervia-backend
diff src/plugins/plugin_misc_account.py @ 2261:8be4f5769bf7
plugin account: print a warning and use "example.net" as default instead or raising an error when xmpp_domain is not set
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 21 Jun 2017 19:36:00 +0200 |
parents | 968b0d13bcc7 |
children | 8b37a62336c3 |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_account.py Wed Jun 21 08:00:14 2017 +0200 +++ b/src/plugins/plugin_misc_account.py Wed Jun 21 19:36:00 2017 +0200 @@ -90,6 +90,8 @@ https://www.salut-a-toi.org """) +DEFAULT_DOMAIN = u"example.net" + class MiscAccount(object): """Account plugin: create a SàT + XMPP account, used by Libervia""" @@ -279,7 +281,8 @@ domain = self.getConfig('new_account_domain') or self.getConfig('xmpp_domain', None) if not domain: - raise ValueError(_(u"xmpp_domain need to be set in sat.conf")) + log.warning(_(u'xmpp_domain needs to be set in sat.conf. Using "{default}" meanwhile').format(default=DEFAULT_DOMAIN)) + return DEFAULT_DOMAIN return domain def _getAccountDialogUI(self, profile):