Skip to content

Commit e856f63

Browse files
Correct exception handling
1 parent 90976b5 commit e856f63

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

arch/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Maintainer: Proton Technologies AG <opensource@proton.me>
22
pkgname=python-proton-client
33
pkgver=0.6.1
4-
pkgrel=2
4+
pkgrel=3
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
proton-python-client (0.6.1-2) unstable; urgency=medium
1+
proton-python-client (0.6.1-3) unstable; urgency=medium
22

33
* Feature: Alternative Routing
44

proton/api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,15 @@ def api_request(
247247
try:
248248
response = self.__make_request(fct, **request_params)
249249
except (
250-
requests.exceptions.ConnectionError,
251-
requests.exceptions.Timeout, TLSPinningError
250+
NewConnectionError,
251+
ConnectionTimeOutError,
252+
TLSPinningError,
252253
) as e:
254+
self._logger.exception(e)
253255
exc_type, *_ = sys.exc_info()
254256
exception_class = exc_type
255257
exception_msg = e
256258
except (Exception, requests.exceptions.BaseHTTPError) as e:
257-
self._logger.exception(e)
258259
raise UnknownConnectionError(e)
259260

260261
if exception_class and (not self.__allow_alternative_routes or _skip_alt_routing_for_api_check or self.__force_skip_alternative_routing): # noqa

rpmbuild/SPECS/python3-proton-client.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%define unmangled_name proton-client
22
%define version 0.6.1
3-
%define release 2
3+
%define release 3
44

55
Prefix: %{_prefix}
66

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

5151
%changelog
52-
* Thu Jul 08 2021 Proton Technologies AG <opensource@proton.me> 0.6.1-2
52+
* Thu Jul 08 2021 Proton Technologies AG <opensource@proton.me> 0.6.1-3
5353
- Feature: Alternative Routing
5454

5555
* Mon May 24 2021 Proton Technologies AG <opensource@proton.me> 0.5.1-3

0 commit comments

Comments
 (0)