Show More
@@ -137,7 +137,7 b' def exception_view(exc, request):' | |||||
137 | rpc_id = getattr(request, 'rpc_id', None) |
|
137 | rpc_id = getattr(request, 'rpc_id', None) | |
138 |
|
138 | |||
139 | if isinstance(exc, JSONRPCError): |
|
139 | if isinstance(exc, JSONRPCError): | |
140 |
fault_message = safe_str(exc |
|
140 | fault_message = safe_str(exc) | |
141 | log.debug('json-rpc error rpc_id:%s "%s"', rpc_id, fault_message) |
|
141 | log.debug('json-rpc error rpc_id:%s "%s"', rpc_id, fault_message) | |
142 | elif isinstance(exc, JSONRPCValidationError): |
|
142 | elif isinstance(exc, JSONRPCValidationError): | |
143 | colander_exc = exc.colander_exception |
|
143 | colander_exc = exc.colander_exception |
@@ -272,7 +272,7 b' def cleanup_sessions(request, apiuser, o' | |||||
272 | older_than_seconds=older_than_seconds) |
|
272 | older_than_seconds=older_than_seconds) | |
273 | return {'sessions_removed': cleaned, 'backend': backend} |
|
273 | return {'sessions_removed': cleaned, 'backend': backend} | |
274 | except user_sessions.CleanupCommand as msg: |
|
274 | except user_sessions.CleanupCommand as msg: | |
275 |
return {'cleanup_command': msg |
|
275 | return {'cleanup_command': str(msg), 'backend': backend} | |
276 | except Exception as e: |
|
276 | except Exception as e: | |
277 | log.exception('Failed session cleanup') |
|
277 | log.exception('Failed session cleanup') | |
278 | raise JSONRPCError( |
|
278 | raise JSONRPCError( |
@@ -83,7 +83,7 b' class AdminSessionSettingsView(BaseAppVi' | |||||
83 | older_than_seconds=older_than_seconds) |
|
83 | older_than_seconds=older_than_seconds) | |
84 | h.flash(_('Cleaned up old sessions'), category='success') |
|
84 | h.flash(_('Cleaned up old sessions'), category='success') | |
85 | except user_sessions.CleanupCommand as msg: |
|
85 | except user_sessions.CleanupCommand as msg: | |
86 |
h.flash(msg |
|
86 | h.flash(str(msg), category='warning') | |
87 | except Exception as e: |
|
87 | except Exception as e: | |
88 | log.exception('Failed session cleanup') |
|
88 | log.exception('Failed session cleanup') | |
89 | h.flash(_('Failed to cleanup up old sessions'), category='error') |
|
89 | h.flash(_('Failed to cleanup up old sessions'), category='error') |
General Comments 0
You need to be logged in to leave comments.
Login now