Rename WSRoot.scan_api to WSRoot._scan_api to avoid infinite recursion by scan_api

This commit is contained in:
Christophe de Vienne 2012-10-26 11:43:40 +02:00
parent 21ea8a9b17
commit d282fda305

View File

@ -83,7 +83,7 @@ class WSRoot(object):
self._debug = True
self._webpath = webpath
self.protocols = []
self.scan_api = scan_api
self._scan_api = scan_api
self._transaction = transaction
if self._transaction is True:
@ -125,7 +125,7 @@ class WSRoot(object):
:rtype: list of (path, :class:`FunctionDefinition`)
"""
if self._api is None:
self._api = [i for i in self.scan_api(self)]
self._api = [i for i in self._scan_api(self)]
for path, fdef in self._api:
fdef.resolve_types(self.__registry__)
return self._api