def func_wrapper(self, *args, **kwargs): if not self.was_login_executed: raise LoginRequired('Use login method first') else: return func(self, *args, **kwargs)
def func_wrapper(self, *args, **kwargs): if not self.was_login_executed: raise LoginRequired('请先登录!') else: return func(self, *args, **kwargs)