@@ -34,7 +34,7 @@ def __init__(self, drive_path: Path) -> None:
34
34
35
35
def list (self ) -> Generator [Path , None , None ]:
36
36
# Get all subdirectories in the drive
37
- for item in self .path .iterdir ():
37
+ for item in self .path .iterdir (): # TODO: protect
38
38
if not item .is_dir ():
39
39
continue
40
40
if item .name in ("Zooprocess" , "Zooscan" , "Background" ):
@@ -119,7 +119,7 @@ def list_scans_with_state(self) -> List[str]:
119
119
"""
120
120
return [
121
121
an_entry .name
122
- for an_entry in self .zooscan_scan .work .path .iterdir ()
122
+ for an_entry in self .zooscan_scan .work .path .iterdir () # TODO: protect
123
123
if an_entry .is_dir ()
124
124
]
125
125
@@ -149,7 +149,7 @@ def read_lut(self) -> LutFile:
149
149
return LutFile .read (config_file )
150
150
151
151
def list (self ) -> List [Path ]:
152
- return list (self .path .iterdir ())
152
+ return list (self .path .iterdir ()) # TODO: protect
153
153
154
154
155
155
class ZooscanMetaFolder :
@@ -201,7 +201,7 @@ def get_8bit_file(self, sample_name: str, index: int) -> Path:
201
201
def list_samples (self ) -> Generator [str , None , None ]:
202
202
"""Not really samples, rather scans i.e. subsamples, but kept with
203
203
same name until a rename TODO"""
204
- for a_file in self .path .iterdir ():
204
+ for a_file in self .path .iterdir (): # TODO: protect
205
205
if a_file .suffix == ".tif" :
206
206
yield a_file .name [:- 6 ]
207
207
0 commit comments