File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
meltingplot/duet_simplyprint_connector/cli Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,10 @@ async def connect_to_duet(address: str, password: str) -> dict:
110110 board = board ['result' ]
111111 duet_name = await duet .rr_model (key = 'network.name' )
112112 duet_name = duet_name ['result' ]
113- webcam_uri = await get_webcam_url (duet )
113+ try :
114+ webcam_uri = await get_webcam_url (duet )
115+ except aiohttp .client_exceptions .ClientResponseError :
116+ webcam_uri = None
114117 try :
115118 cookie = await get_cookie (duet )
116119 except aiohttp .client_exceptions .ClientResponseError :
@@ -132,7 +135,7 @@ async def connect_to_duet(address: str, password: str) -> dict:
132135 'duet_uri' : normalize_url (f'{ address } ' ),
133136 'duet_password' : password ,
134137 'duet_unique_id' : f"{ board ['uniqueId' ]} " ,
135- 'webcam_uri' : normalize_url (webcam_uri ),
138+ 'webcam_uri' : normalize_url (webcam_uri ) if webcam_uri is not None else None ,
136139 'cookie' : cookie ,
137140 }
138141
You can’t perform that action at this time.
0 commit comments