diff --git a/pyezviz/client.py b/pyezviz/client.py index d174dea..d5a92a9 100644 --- a/pyezviz/client.py +++ b/pyezviz/client.py @@ -683,7 +683,7 @@ def api_set_defence_mode(self, mode: DefenseModeType, max_retries=0): if err.response.status_code == 401 or 504: # session is wrong, need to relogin self.login() - return self.api_set_defence_mode(DefenseModeType, max_retries + 1) + return self.api_set_defence_mode(mode, max_retries + 1) raise requests.HTTPError(err)