1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

[#132 state:fixed] Added a debug mode preference as well as extra debug loggings.

This commit is contained in:
Virgil Dupras
2011-01-26 12:50:44 +01:00
parent 21efef42f7
commit 6abbeaf987
23 changed files with 619 additions and 127 deletions

View File

@@ -7,6 +7,7 @@
# http://www.hardcoded.net/licenses/bsd_license
from xml.etree import ElementTree as ET
import logging
from hscommon import io
from hscommon.path import Path
@@ -24,7 +25,7 @@ class AlreadyThereError(Exception):
class InvalidPathError(Exception):
"""The path being added is invalid"""
class Directories(object):
class Directories:
#---Override
def __init__(self, fileclasses=[fs.File]):
self._dirs = []
@@ -63,7 +64,9 @@ class Directories(object):
try:
filepaths = set()
if state != STATE_EXCLUDED:
for file in fs.get_files(from_path, fileclasses=self.fileclasses):
found_files = fs.get_files(from_path, fileclasses=self.fileclasses)
logging.debug("Collected {} files in folder {}".format(len(found_files), str(from_path)))
for file in found_files:
file.is_ref = state == STATE_REFERENCE
filepaths.add(file.path)
yield file