Formatting and fixing wrong variable in loop
This commit is contained in:
parent
251b0ca770
commit
99e52bcb2f
1 changed files with 5 additions and 3 deletions
|
|
@ -771,8 +771,10 @@ class SmartScanThing(Thing):
|
||||||
images_folder = os.path.join(path, IMG_DIR_NAME)
|
images_folder = os.path.join(path, IMG_DIR_NAME)
|
||||||
if os.path.isdir(images_folder):
|
if os.path.isdir(images_folder):
|
||||||
folder_contents = os.listdir(images_folder)
|
folder_contents = os.listdir(images_folder)
|
||||||
scan_images = [i for i in folder_contents if IMAGE_REGEX.search(x)]
|
scan_images = [i for i in folder_contents if IMAGE_REGEX.search(i)]
|
||||||
stitches = [i for i in folder_contents if i.endswith("_stitched.jpg")]
|
stitches = [
|
||||||
|
i for i in folder_contents if i.endswith("_stitched.jpg")
|
||||||
|
]
|
||||||
number_of_images = len(scan_images)
|
number_of_images = len(scan_images)
|
||||||
stitch_available = len(stitches) > 0
|
stitch_available = len(stitches) > 0
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue