def check(self, action, version=None):
        """Check if the given action is supported in the given version.

        @raises APIError: If there's no method class registered for handling
            the given action or version.
        """
        if action not in self._by_action:
            raise APIError(400, "InvalidAction", "The action %s is not valid "
                           "for this web service." % action)
        by_version = self._by_action[action]
        if None not in by_version:
            # There's no catch-all method, let's try the version-specific one
            if version not in by_version:
                raise APIError(400, "InvalidVersion", "Invalid API version.")
def check ( self , action , version = None ) : if action not in self . _by_action : raise APIError ( 400 , "InvalidAction" , "The action %s is not valid " "for this web service." % action ) by_version = self . _by_action [ action ] if None not in by_version : if version not in by_version : raise APIError ( 400 , "InvalidVersion" , "Invalid API version." )
Check if the given action is supported in the given version.

        @raises APIError: If there's no method class registered for handling
            the given action or version.