Skip to content

Commit

Permalink
Update variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
calexandru2018 committed Oct 19, 2021
1 parent c45c99d commit 547abc8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion arch/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Proton Technologies AG <[email protected]>
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"
Expand Down
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 7 additions & 7 deletions proton/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions rpmbuild/SPECS/python3-proton-client.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%define unmangled_name proton-client
%define version 0.7.1
%define release 1
%define release 2

Prefix: %{_prefix}

Expand Down Expand Up @@ -49,7 +49,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)

%changelog
* Fri Sep 24 2021 Proton Technologies AG <[email protected]> 0.7.1-1
* Fri Sep 24 2021 Proton Technologies AG <[email protected]> 0.7.1-2
- Improve: Logging
- Improve: Alternative routing logic
- Improve: Human verification logic
Expand Down

0 comments on commit 547abc8

Please sign in to comment.