New API: work better for bad ExportServices.
Using the partially ported koo/subscription service, discovered that 'None' would be returned, which leads to an exception. bzr revid: p_christ@hol.gr-20091003090003-z9m8yyp08vxnor0s
This commit is contained in:
parent
e384a2da40
commit
bb2722ed64
|
@ -109,10 +109,10 @@ class ExportService(object):
|
|||
return cls._services[name]
|
||||
|
||||
def dispatch(self, method, auth, params):
|
||||
pass
|
||||
raise Exception("stub dispatch at %s" % self.__name)
|
||||
|
||||
def new_dispatch(self,method,auth,params):
|
||||
pass
|
||||
raise Exception("stub dispatch at %s" % self.__name)
|
||||
|
||||
def abortResponse(self, error, description, origin, details):
|
||||
if not tools.config['debug_mode']:
|
||||
|
@ -354,6 +354,9 @@ class OpenERPDispatcher:
|
|||
auth = None
|
||||
result = ExportService.getService(service_name).dispatch(method, auth, params)
|
||||
self.log('result', result)
|
||||
# We shouldn't marshall None,
|
||||
if result == None:
|
||||
result = False
|
||||
return result
|
||||
except Exception, e:
|
||||
self.log('exception', tools.exception_to_unicode(e))
|
||||
|
|
Loading…
Reference in New Issue