Univention Bugzilla – Attachment 6324 Details for
Bug 34047
UMC-Server: Message logs attribute warnings if not application/json
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
mimetype_warnings.patch (text/plain), 4.66 KB, created by
Florian Best
on 2014-11-07 13:12:50 CET
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2014-11-07 13:12:50 CET
Size:
4.66 KB
patch
obsolete
>diff --git a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/modules/__init__.py b/ucs-4.0-0/management/univention-management-console/src/univention/management/console/modules/__init__.py >index ca4ed29..69c7bbc 100644 >--- a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/modules/__init__.py >+++ b/ucs-4.0-0/management/univention-management-console/src/univention/management/console/modules/__init__.py >@@ -201,7 +201,6 @@ class Base(signals.Provider, Translation): > def __init__(self): > signals.Provider.__init__(self) > self.signal_new('success') >- self.signal_new('failure') > self._username = None > self._user_dn = None > self._password = None >@@ -297,11 +296,5 @@ class Base(signals.Provider, Translation): > > def result(self, response): > if response.id in self.__requests: >- object, method = self.__requests[response.id] >- if response.status in (SUCCESS, SUCCESS_MESSAGE, SUCCESS_PARTIAL, SUCCESS_SHUTDOWN): >- response.module = ['ready'] >- self.signal_emit('success', response) >- else: >- response.module = ['failure'] >- self.signal_emit('failure', response) >+ self.signal_emit('success', response) > del self.__requests[response.id] >diff --git a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/message.py b/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/message.py >index 715ec10..31620fa 100644 >--- a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/message.py >+++ b/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/message.py >@@ -170,13 +170,13 @@ class Message(object): > else: > self.body[key] = value > else: >- PARSER.process('Attribute %s just available for MIME type %s' % (key, MIMETYPE_JSON)) >+ PARSER.info('Attribute %s just available for MIME type %s' % (key, MIMETYPE_JSON)) > > def _get_key(self, key): > if self.mimetype == MIMETYPE_JSON: > return self.body.get(key) > else: >- PARSER.process('Attribute %s just available for MIME type %s' % (key, MIMETYPE_JSON)) >+ PARSER.info('Attribute %s just available for MIME type %s' % (key, MIMETYPE_JSON)) > return None > > #: contains a human readable error message >@@ -308,7 +308,7 @@ class Response(Message): > self.parse(data) > > def is_final(self): >- return (self._id and self.status != SUCCESS_PARTIAL) >+ return (self._id and (self.mimetype != MIMETYPE_JSON or self.status != SUCCESS_PARTIAL)) > > recreate_id = None > >diff --git a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/modserver.py b/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/modserver.py >index ed5fa80..73ea463 100644 >--- a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/modserver.py >+++ b/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/modserver.py >@@ -110,7 +110,6 @@ class ModuleServer(Server): > self.__init_error_message = error > else: > self.__handler.signal_connect('success', notifier.Callback(self._reply, True)) >- self.__handler.signal_connect('failure', notifier.Callback(self._reply, True)) > > def _reply(self, msg, final): > if final: >diff --git a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/server.py b/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/server.py >index 5e20602..89cf2f9 100644 >--- a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/server.py >+++ b/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/server.py >@@ -53,7 +53,7 @@ from univention.lib.i18n import Translation > _ = Translation('univention.management.console').translate > > # internal packages >-from .message import Message, Response, IncompleteMessageError, ParseError, UnknownCommandError, InvalidArgumentsError, InvalidOptionsError >+from .message import Message, Response, IncompleteMessageError, ParseError, UnknownCommandError, InvalidArgumentsError, InvalidOptionsError, MIMETYPE_JSON > from .session import State, Processor > from .definitions import ( > BAD_REQUEST_FORBIDDEN, BAD_REQUEST_INVALID_ARGS, >@@ -357,7 +357,7 @@ class MagicBucket(object): > return > > # module process wants to exit >- if msg.status == SUCCESS_SHUTDOWN: >+ if msg.mimetype == MIMETYPE_JSON and msg.status == SUCCESS_SHUTDOWN: > module_name = state.processor.get_module_name(msg.arguments[0]) > if module_name: > state.processor._purge_child(module_name)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 34047
: 6324