diff --git a/steampy/login.py b/steampy/login.py index 427124c..51b1e41 100644 --- a/steampy/login.py +++ b/steampy/login.py @@ -1,4 +1,5 @@ from time import time +from http import HTTPStatus from base64 import b64encode from rsa import encrypt, PublicKey @@ -65,7 +66,7 @@ def _fetch_rsa_params(self, current_number_of_repetitions: int = 0) -> dict: request_data = {'account_name': self.username} response = self._api_call('GET', 'IAuthenticationService', 'GetPasswordRSAPublicKey', params=request_data) - if response.status_code == 200 and 'response' in response.json(): + if response.status_code == HTTPStatus.OK and 'response' in response.json(): key_data = response.json()['response'] # Steam may return an empty "response" value even if the status is 200 if 'publickey_mod' in key_data and 'publickey_exp' in key_data and 'timestamp' in key_data: