Commit bab83481 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Use a python 3.5 compat method to scan dirs

parent 76ff47ba
......@@ -1484,14 +1484,14 @@ def get_available_emoticon_themes():
files = []
with os.scandir(configpaths.get('EMOTICONS')) as scan:
for entry in scan:
if not entry.is_dir():
with os.scandir(entry.path) as scan_theme:
for theme in scan_theme:
if theme.is_file():
dir_iterator = os.scandir(configpaths.get('EMOTICONS'))
for folder in dir_iterator:
if not folder.is_dir():
file_iterator = os.scandir(folder.path)
for theme in file_iterator:
if theme.is_file():
if os.path.isdir(configpaths.get('MY_EMOTS')):
files += os.listdir(configpaths.get('MY_EMOTS'))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment