diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a017ca..510f747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # Changelog +## 0.2.1 (Unreleased) + +### Added + +### Changed + +- Fixed `AttributeError: 'list' object has no attribute 'items'` error thrown in `TransportationSystem.getRoutes()` + +### Removed + + ## 0.2.0 (2024-07-31) ### Added diff --git a/passiogo/__init__.py b/passiogo/__init__.py index bdcb7a0..076d948 100644 --- a/passiogo/__init__.py +++ b/passiogo/__init__.py @@ -149,12 +149,13 @@ def getRoutes( if(routes == None): return(None) + # Handle Differing Response Format if "all" in routes: routes = routes["all"] allRoutes = [] - for digit, route in routes.items(): + for route in routes: possibleKeys = ["id", "groupId", "groupColor", "name", "shortName", "nameOrig", "fullname", "myid", "mapApp", "archive", "goPrefixRouteName", "goShowSchedule", "outdated", "distance", "latitude", "longitude", "timezone", "serviceTime", "serviceTimeShort"] for possibleKey in possibleKeys: @@ -634,12 +635,12 @@ def launchWS(): def handleWsError(wsapp, error): - vars.errors.append(f"->WebSocketError: {error}") + ... def handleWsClose(wsapp, close_status_code, close_msg): wsapp.close() - vars.logs.append("Closing WebSocket") + ... def subscribeWS( diff --git a/setup.py b/setup.py index 20e3bb3..5d3df85 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='PassioGo', - version="0.2.0", + version="0.2.1", description="An unofficial API for Passio Go", long_description=long_description, long_description_content_type='text/markdown',