Mercurial > libervia-backend
changeset 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 (2017-06-21) |
parents | 45b89d7c5c81 |
children | 24f5a4d5f195 |
files | src/plugins/plugin_misc_account.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
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):