File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 55
66setuptools .setup (
77 name = "teslemetry_stream" ,
8- version = "0.6.4 " ,
8+ version = "0.6.5 " ,
99 author = "Brett Adams" ,
10101111 description = "Teslemetry Streaming API library for Python" ,
Original file line number Diff line number Diff line change @@ -86,12 +86,18 @@ async def get_config(self) -> None:
8686 req = await self .stream ._session .get (
8787 f"https://api.teslemetry.com/api/config/{ self .vin } " ,
8888 headers = self .stream ._headers ,
89- raise_for_status = True ,
89+ raise_for_status = False ,
9090 )
91- response = await req .json ()
91+ if req .status == 200 :
92+ response = await req .json ()
93+
94+ self .fields = response .get ("fields" )
95+ self .preferTyped = response .get ("prefer_typed" ,False )
96+ return
97+ if req .status == 404 :
98+ return
9299
93- self .fields = response .get ("fields" )
94- self .preferTyped = response .get ("prefer_typed" ,False )
100+ req .raise_for_status ()
95101
96102 async def update_config (self , config : dict ) -> None :
97103 """Update the configuration for the vehicle."""
You can’t perform that action at this time.
0 commit comments