Skip to content

Commit 1839c0c

Browse files
authored
Fix: module spider_plus with filtered folders
With option to filter folders is set and a folder matches the filter, there is a typo in the incremented counter. The counter should be ` self.stats[f"num_{result_type}s_filtered"]` and not `self.stats[f"{result_type}s_filtered"]`. The latter does not exists and trigger the following error: ``` KeyError: 'folders_filtered' ``` Signed-off-by: Guillem Lefait <guillem.lefait@gmail.com>
1 parent e76d4e9 commit 1839c0c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nxc/modules/spider_plus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def spider_folder(self, share_name, folder):
255255
# Check file-dir exclusion filter.
256256
if any(d in next_filedir.lower() for d in self.exclude_filter):
257257
self.logger.info(f'The {result_type} "{next_filedir}" has been excluded')
258-
self.stats[f"{result_type}s_filtered"] += 1
258+
self.stats[f"num_{result_type}s_filtered"] += 1
259259
continue
260260

261261
if result_type == "folder":

0 commit comments

Comments
 (0)