diff --git a/arch/PKGBUILD b/arch/PKGBUILD index f965f86..877db16 100644 --- a/arch/PKGBUILD +++ b/arch/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Proton Technologies AG pkgname=python-proton-client pkgver=0.7.1 -pkgrel=1 +pkgrel=2 pkgdesc="Safely login with ProtonVPN credentials to connect to Proton." arch=("any") url="https://github.com/ProtonMail/proton-python-client" diff --git a/debian/changelog b/debian/changelog index d93d43d..f12846b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -proton-python-client (0.7.1-1) unstable; urgency=medium +proton-python-client (0.7.1-2) unstable; urgency=medium * Improve: Logging * Improve: Alternative routing logic diff --git a/proton/api.py b/proton/api.py index 5205d61..2fb810c 100644 --- a/proton/api.py +++ b/proton/api.py @@ -147,7 +147,7 @@ def __init__( self.__metadata = MetadataBackend.get_backend() self.__metadata.cache_dir_path = cache_dir_path self.__metadata.logger = self._logger - self.__allow_alternative_routes = None + self.__allow_alternative_routing = None # Verify modulus self.__gnupg = gnupg.GPG() @@ -188,7 +188,7 @@ def api_request( Returns: requests.Response """ - if self.__allow_alternative_routes is None: + if self.__allow_alternative_routing is None: msg = "Alternative routing has not been configured before making API requests. " \ "Please either enable or disable it before making any requests." self._logger.info(msg) @@ -217,7 +217,7 @@ def api_request( _verify = True if not self.__metadata.try_original_url( - self.__allow_alternative_routes, + self.__allow_alternative_routing, self.__force_skip_alternative_routing ): _url = self.__metadata.get_alternative_url() @@ -251,7 +251,7 @@ def api_request( self._logger.exception(e) raise UnknownConnectionError(e) - if exception_class and (not self.__allow_alternative_routes or _skip_alt_routing_for_api_check or self.__force_skip_alternative_routing): # noqa + if exception_class and (not self.__allow_alternative_routing or _skip_alt_routing_for_api_check or self.__force_skip_alternative_routing): # noqa self._logger.info("{}: {}".format(exception_class, exception_msg)) raise exception_class(exception_msg) elif ( @@ -618,7 +618,7 @@ def captcha_url(self): @property def enable_alternative_routing(self): """Alternative routing getter.""" - return self.__allow_alternative_routes + return self.__allow_alternative_routing @enable_alternative_routing.setter def enable_alternative_routing(self, newvalue): @@ -631,8 +631,8 @@ def enable_alternative_routing(self, newvalue): Args: newvalue (bool) """ - if self.__allow_alternative_routes != bool(newvalue): - self.__allow_alternative_routes = bool(newvalue) + if self.__allow_alternative_routing != bool(newvalue): + self.__allow_alternative_routing = bool(newvalue) @property def force_skip_alternative_routing(self): diff --git a/rpmbuild/SPECS/python3-proton-client.spec b/rpmbuild/SPECS/python3-proton-client.spec index f8c3457..63a25be 100644 --- a/rpmbuild/SPECS/python3-proton-client.spec +++ b/rpmbuild/SPECS/python3-proton-client.spec @@ -1,6 +1,6 @@ %define unmangled_name proton-client %define version 0.7.1 -%define release 1 +%define release 2 Prefix: %{_prefix} @@ -49,7 +49,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %changelog -* Fri Sep 24 2021 Proton Technologies AG 0.7.1-1 +* Fri Sep 24 2021 Proton Technologies AG 0.7.1-2 - Improve: Logging - Improve: Alternative routing logic - Improve: Human verification logic