Commit ca72371 1 parent 3b3ea7d commit ca72371 Copy full SHA for ca72371
File tree 1 file changed +2
-4
lines changed
custom_components/ultimaker
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -105,19 +105,17 @@ async def async_update(self):
105
105
self ._data = await self .fetch_data (self ._url_printer )
106
106
self ._data |= await self .fetch_data (self ._url_print_job )
107
107
self ._data |= await self .fetch_data (self ._url_system )
108
- except aiohttp .ClientConnectorError :
108
+ except aiohttp .ClientError :
109
109
self ._data = {'status' : 'not connected' }
110
110
self ._data ['sampleTime' ] = datetime .now ()
111
111
112
112
async def fetch_data (self , url ):
113
113
try :
114
114
with async_timeout .timeout (5 ):
115
115
response = await self ._session .get (url )
116
- except aiohttp .ClientConnectorError as err :
116
+ except aiohttp .ClientError as err :
117
117
_LOGGER .warning (f"Printer { self ._host } is offline" )
118
118
raise err
119
- except aiohttp .ClientError as err :
120
- _LOGGER .error (f"Cannot poll Ultimaker printer using url: { url } error { err } " )
121
119
except asyncio .TimeoutError :
122
120
_LOGGER .error (f" Timeout error occurred while polling ultimaker printer using url { url } " )
123
121
except Exception as err :
You can’t perform that action at this time.
0 commit comments