Univention Bugzilla – Attachment 8939 Details for
Bug 39963
CONNECT_ERROR not handled by UDM module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
39963.patch (text/plain), 2.72 KB, created by
Florian Best
on 2017-06-20 12:42 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2017-06-20 12:42 CEST
Size:
2.72 KB
patch
obsolete
>diff --git a/management/univention-management-console/src/univention/management/console/base.py b/management/univention-management-console/src/univention/management/console/base.py >index 1327a50..578df69 100644 >--- a/management/univention-management-console/src/univention/management/console/base.py >+++ b/management/univention-management-console/src/univention/management/console/base.py >@@ -126,7 +126,7 @@ def query(self, request): > from univention.management.console.ldap import get_user_connection > from univention.management.console.config import ucr > from univention.management.console.log import MODULE, CORE >-from univention.management.console.error import UMC_Error, NotAcceptable, PasswordRequired, LDAP_ServerDown >+from univention.management.console.error import UMC_Error, NotAcceptable, PasswordRequired, LDAP_ServerDown, LDAP_ConnectionFailed > > _ = Translation('univention.management.console').translate > >@@ -292,6 +292,8 @@ def error_handling(self, etype, exc, etraceback): > exc = exc.original_exception > if isinstance(exc, ldap.SERVER_DOWN): > raise LDAP_ServerDown() >+ if isinstance(exc, ldap.CONNECT_ERROR): >+ raise LDAP_ConnectionFailed(exc) > > def __error_handling(self, request, method, etype, exc, etraceback): > message = '' >diff --git a/management/univention-management-console/src/univention/management/console/error.py b/management/univention-management-console/src/univention/management/console/error.py >index cde1a2f..8fc8a90 100644 >--- a/management/univention-management-console/src/univention/management/console/error.py >+++ b/management/univention-management-console/src/univention/management/console/error.py >@@ -131,3 +131,21 @@ def _error_msg(self): > # yield _('If the problem persists additional hints about the cause can be found in the following log file(s):') > # yield ' * /var/log/univention/management-console-server.log' > # yield ' * /var/log/univention/management-console-module-*.log' >+ >+ >+class LDAP_ConnectionFailed(LDAP_ServerDown): >+ >+ def __init__(self, exc): >+ self.exc = exc >+ super(LDAP_ConnectionFailed, self).__init__() >+ >+ def _error_msg(self): >+ yield _('Cannot connect to the LDAP service.') >+ yield _('Error message: %s') % (self.exc.args[0].get('info', ''),) >+ yield _('The following steps can help to solve this problem:') >+ if not self._is_master: >+ yield ' * ' + _('Make sure the domain controller master is running and reachable from %s') % (self._fqdn,) >+ yield ' * ' + _('Check the SSL certificates, proxy and firewall settings.') >+ yield ' * ' + _('Restart the LDAP service on the domain controller master either via "service slapd restart" on command line or with the UMC module "System services"') >+ if self._updates_available: >+ yield ' * ' + _('Install the latest software updates')
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 39963
: 8939