Esempio n. 1
0
    def get_grant(self, state, **kwargs):
        # try:
        # _state = kwargs["state"]
        # if not _state:
        #         _state = self.state
        # except KeyError:
        #     _state = self.state

        try:
            return self.grant[state]
        except KeyError:
            raise GrantError("No grant found for state:'%s'" % state)
Esempio n. 2
0
 def get_grant(self, state: str, **kwargs) -> Grant:
     try:
         return self.grant[state]
     except KeyError:
         raise GrantError("No grant found for state:'%s'" % state)