Module: check_mk
Branch: master
Commit: dbef4c3acfe1db816015eacea69ef3f3d2187ac9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dbef4c3acfe1db…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 09:33:30 2013 +0100
user sync: More verbose exception handling during manually triggered user sync
---
web/htdocs/wato.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4414320..029eac2 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8872,7 +8872,11 @@ def mode_users(phase):
if userdb.hook_sync(add_to_changelog = True, raise_exc = True):
return None, _('The user synchronization completed
successfully.')
except Exception, e:
- raise MKUserError(None, str(e))
+ if config.debug:
+ import traceback
+ raise MKUserError(None, traceback.format_exc().replace('\n',
'<br>\n'))
+ else:
+ raise MKUserError(None, str(e))
return None