File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
image_in_window_screensaver Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ from logging import currentframe
12from os import path as Path
23from typing import List
34import custom_log as l
45import os
56import argument_handler as argh
67
7-
8+ current_mode = None
9+ def get_mode ():
10+ return current_mode
811def walk (mode = None ) -> List :
912 """
1013 walks through a path to return list of absolute path of images with png or jpg extensions
@@ -16,6 +19,8 @@ def walk(mode=None) -> List:
1619 path : str = argh .get_path ()
1720 if mode :
1821 path += mode
22+ global current_mode
23+ current_mode = mode
1924 l .log (path )
2025 ignore : str = argh .get_ignore_word ()
2126 l .log ("checking path integrity" )
@@ -47,11 +52,11 @@ def is_exclude_image(image_path: str, ignore_word: str) -> str:
4752 list_ignores = ignore_word .split (',' )
4853
4954 for word in list_ignores :
50- if image_path .lower ().find (word ) is not - 1 :
55+ if image_path .lower ().find (word ) != - 1 :
5156 l .log (["found entry in list_ignore: " , image_path , word ])
5257 return True
5358 else :
54- if image_path .lower ().find (ignore_word ) is not - 1 :
59+ if image_path .lower ().find (ignore_word ) != - 1 :
5560 l .log (["found entry in list_ignore: " , image_path , ignore_word ])
5661 return True
5762 return False
You can’t perform that action at this time.
0 commit comments