diff --git a/ccserver/handlers.py b/ccserver/handlers.py index 48c10a2065e0ada848fd9fcd32aa1ae6a069e0f5..56ae5a6262ae8ada39af8bdcc934d2305a5fa57d 100644 --- a/ccserver/handlers.py +++ b/ccserver/handlers.py @@ -85,14 +85,7 @@ class ClientHandler(OnlineCCHandler): return tuple(found_vm) - @pure - @listed - def list(self, query): - ''' - List all objects registered on this instance. - ''' - - logging.debug('Executed list function with query %s' % query) + def _list(self, query): # Contains all the objects to be filted: objects = [] @@ -136,6 +129,15 @@ class ClientHandler(OnlineCCHandler): # Filter the objects with the query, and return it: return query.filter(objects) + @pure + @listed + def list(self, query): + ''' + List all objects registered on this instance. + ''' + + logging.debug('Executed list function with query %s' % query) + return self._list(query) class AuthenticationError(Exception): pass