Fix clean_dir for Python 3

TypeError when testing str > int
This commit is contained in:
Labrys of Knossos 2019-01-06 10:36:52 -05:00
commit 36932e25c6

View file

@ -283,7 +283,8 @@ def clean_dir(path, section, subsection):
try:
num_files = len(list_media_files(path, min_size=min_size, delete_ignored=delete_ignored))
except Exception:
num_files = 'unknown'
num_files = 0
if num_files > 0:
logger.info(
'Directory {0} still contains {1} unprocessed file(s), skipping ...'.format(path, num_files),