def check_auth(self, name):
        """
        Check the authorization for the command
        """
        if name in self.auths:
            # if the command name is in the **need authorization list**
            # get the authorization for the command
            auth = self.auths[name]
            if self.args.auth is None:
                # if we didn't pass the authorization phrase raise the
                # appropriate exception
                raise exceptions.ArgParseInatorAuthorizationRequired
            elif ((auth is True and self.args.auth != self.auth_phrase) or
                  (auth is not True and self.args.auth != auth)):
                # else if the authorization phrase is wrong
                raise exceptions.ArgParseInatorNotValidAuthorization
        return True
def check_auth ( self , name ) : if name in self . auths : auth = self . auths [ name ] if self . args . auth is None : raise exceptions . ArgParseInatorAuthorizationRequired elif ( ( auth is True and self . args . auth != self . auth_phrase ) or ( auth is not True and self . args . auth != auth ) ) : raise exceptions . ArgParseInatorNotValidAuthorization return True
Check the authorization for the command