Return an empty scans list if the folder is missing
This commit is contained in:
parent
6b6946ec60
commit
f4c4206a53
1 changed files with 2 additions and 0 deletions
|
|
@ -650,6 +650,8 @@ class SmartScanThing(Thing):
|
|||
in the `images` folder.
|
||||
"""
|
||||
scans: list[ScanInfo] = []
|
||||
if not os.path.isdir(self.scans_folder_path):
|
||||
return scans
|
||||
for f in os.listdir(self.scans_folder_path):
|
||||
path = os.path.join(self.scans_folder_path, f)
|
||||
if os.path.isdir(path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue