File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,8 @@ def port(self, port: str) -> None:
176176 raise StickError (
177177 "Unable to change port while connected. Disconnect first"
178178 )
179- if self ._port is None :
180- self ._port = port
181- if port != self ._port :
182- self ._port = port
179+
180+ self ._port = port
183181
184182 @property
185183 def accept_join_request (self ) -> bool | None :
@@ -278,14 +276,14 @@ async def connect(self, port: str | None = None) -> None:
278276 f"Already connected to { self ._port } , " +
279277 "Close existing connection before (re)connect."
280278 )
281- if port is not None :
282- self ._port = port
283279
284280 if self ._port is None :
285281 raise StickError (
286282 "Unable to connect. " +
287283 "Path to USB-Stick is not defined, set port property first"
288284 )
285+
286+ self ._port = port
289287 await self ._controller .connect_to_stick (
290288 self ._port ,
291289 )
You can’t perform that action at this time.
0 commit comments