Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Larbino1 authored May 23, 2024
1 parent d93a819 commit adec320
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sksurgerynditracker/nditracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def _get_serial_port_name(configuration):
" Result: ", result, file=fileout)
if result == ndicapy.NDI_OKAY:
break
else:
else:
# If we did not break from the for loop:
raise IOError('Could not find any NDI device in '
f'{ports_to_probe} serial port candidates checked. '
+ SERIAL_CONNECTION_ERRMSG)
Expand All @@ -88,14 +89,15 @@ def _get_serial_port_name(configuration):
" Result: ", result, file=fileout)
else:
raise IOError(f'Could not connect to serial port {serial_port} '
f'as there are only {len(serial_ports)} ports available'
f'as there are only {len(serial_ports)} ports available.'
+ SERIAL_CONNECTION_ERRMSG)

if isinstance(serial_port, str):
name = serial_port
result = ndicapy.ndiProbe(name)
print("Probing port: ", name,
" Result: ", result, file=fileout)

if result != ndicapy.NDI_OKAY:
raise IOError(f'Could not connect to an NDI device on the chosen port, {serial_port}.'
+ SERIAL_CONNECTION_ERRMSG)
Expand Down

0 comments on commit adec320

Please sign in to comment.