Skip to content

Commit a3b4887

Browse files
Update device_startup_functions.py
Minor formatting for readability. On mesoSPIM, with a camera serial number of 003209, the try statement does throw a ValueError, but the camera loads properly.
1 parent 2872042 commit a3b4887

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/navigate/model/device_startup_functions.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,11 +1238,16 @@ def load_devices(configuration, is_synthetic=False, plugin_devices={}) -> dict:
12381238
device_ref_name = build_ref_name(
12391239
"_", device["type"], camera_serial_number
12401240
)
1241-
# if the serial number is with leading zeros, the yaml reader will convert it to a octal number
1241+
# if the serial number has leading zeros,
1242+
# the yaml reader will convert it to an octal number
12421243
if camera_serial_number.startswith("0"):
12431244
try:
12441245
oct_num = int(camera_serial_number, 8)
1245-
devices["camera"][build_ref_name("_", device["type"], oct_num)] = camera
1246+
devices["camera"][build_ref_name(
1247+
"_",
1248+
device["type"],
1249+
oct_num
1250+
)] = camera
12461251
except ValueError:
12471252
pass
12481253
else:

0 commit comments

Comments
 (0)