Skip to content

Commit 547abc8

Browse files
Update variable name
1 parent c45c99d commit 547abc8

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

arch/PKGBUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Maintainer: Proton Technologies AG <[email protected]>
22
pkgname=python-proton-client
33
pkgver=0.7.1
4-
pkgrel=1
4+
pkgrel=2
55
pkgdesc="Safely login with ProtonVPN credentials to connect to Proton."
66
arch=("any")
77
url="https://github.com/ProtonMail/proton-python-client"

debian/changelog

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
proton-python-client (0.7.1-1) unstable; urgency=medium
1+
proton-python-client (0.7.1-2) unstable; urgency=medium
22

33
* Improve: Logging
44
* Improve: Alternative routing logic

proton/api.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def __init__(
147147
self.__metadata = MetadataBackend.get_backend()
148148
self.__metadata.cache_dir_path = cache_dir_path
149149
self.__metadata.logger = self._logger
150-
self.__allow_alternative_routes = None
150+
self.__allow_alternative_routing = None
151151

152152
# Verify modulus
153153
self.__gnupg = gnupg.GPG()
@@ -188,7 +188,7 @@ def api_request(
188188
Returns:
189189
requests.Response
190190
"""
191-
if self.__allow_alternative_routes is None:
191+
if self.__allow_alternative_routing is None:
192192
msg = "Alternative routing has not been configured before making API requests. " \
193193
"Please either enable or disable it before making any requests."
194194
self._logger.info(msg)
@@ -217,7 +217,7 @@ def api_request(
217217
_verify = True
218218

219219
if not self.__metadata.try_original_url(
220-
self.__allow_alternative_routes,
220+
self.__allow_alternative_routing,
221221
self.__force_skip_alternative_routing
222222
):
223223
_url = self.__metadata.get_alternative_url()
@@ -251,7 +251,7 @@ def api_request(
251251
self._logger.exception(e)
252252
raise UnknownConnectionError(e)
253253

254-
if exception_class and (not self.__allow_alternative_routes or _skip_alt_routing_for_api_check or self.__force_skip_alternative_routing): # noqa
254+
if exception_class and (not self.__allow_alternative_routing or _skip_alt_routing_for_api_check or self.__force_skip_alternative_routing): # noqa
255255
self._logger.info("{}: {}".format(exception_class, exception_msg))
256256
raise exception_class(exception_msg)
257257
elif (
@@ -618,7 +618,7 @@ def captcha_url(self):
618618
@property
619619
def enable_alternative_routing(self):
620620
"""Alternative routing getter."""
621-
return self.__allow_alternative_routes
621+
return self.__allow_alternative_routing
622622

623623
@enable_alternative_routing.setter
624624
def enable_alternative_routing(self, newvalue):
@@ -631,8 +631,8 @@ def enable_alternative_routing(self, newvalue):
631631
Args:
632632
newvalue (bool)
633633
"""
634-
if self.__allow_alternative_routes != bool(newvalue):
635-
self.__allow_alternative_routes = bool(newvalue)
634+
if self.__allow_alternative_routing != bool(newvalue):
635+
self.__allow_alternative_routing = bool(newvalue)
636636

637637
@property
638638
def force_skip_alternative_routing(self):

rpmbuild/SPECS/python3-proton-client.spec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%define unmangled_name proton-client
22
%define version 0.7.1
3-
%define release 1
3+
%define release 2
44

55
Prefix: %{_prefix}
66

@@ -49,7 +49,7 @@ rm -rf $RPM_BUILD_ROOT
4949
%defattr(-,root,root)
5050

5151
%changelog
52-
* Fri Sep 24 2021 Proton Technologies AG <[email protected]> 0.7.1-1
52+
* Fri Sep 24 2021 Proton Technologies AG <[email protected]> 0.7.1-2
5353
- Improve: Logging
5454
- Improve: Alternative routing logic
5555
- Improve: Human verification logic

0 commit comments

Comments
 (0)