Skip to content

Commit f5d1d19

Browse files
committed
Fixed issue with exception imports
1 parent ec1e501 commit f5d1d19

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

garminconnect/__init__.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,8 @@
1212

1313
import garth
1414
import requests
15-
from garth.exc import HTTPError
16-
17-
# Try to import additional garth exceptions
18-
try:
19-
from garth.exc import GarthException, GarthHTTPError
20-
except ImportError:
21-
# Fallback if GarthException doesn't exist
22-
GarthException = Exception
23-
try:
24-
from garth.exc import GarthHTTPError
25-
except ImportError:
26-
GarthHTTPError = HTTPError
15+
from garth.exc import GarthException, GarthHTTPError
16+
from requests import HTTPError
2717

2818
from .fit import FitEncoderWeight # type: ignore
2919

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "garminconnect"
3-
version = "0.2.29"
3+
version = "0.2.30"
44
description = "Python 3 API wrapper for Garmin Connect"
55
authors = [
66
{name = "Ron Klinkien", email = "ron@cyberjunky.nl"},

0 commit comments

Comments
 (0)