From 0b1b687ca300c8911d1766db2eb1046181c340d3 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 21 Jun 2017 19:36:00 +0200 Subject: [PATCH] plugin account: print a warning and use "example.net" as default instead or raising an error when xmpp_domain is not set --- src/plugins/plugin_misc_account.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/plugin_misc_account.py b/src/plugins/plugin_misc_account.py index d89d2683..95fc3f16 100755 --- a/src/plugins/plugin_misc_account.py +++ b/src/plugins/plugin_misc_account.py @@ -90,6 +90,8 @@ Salut à Toi association 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 @@ class MiscAccount(object): 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):