@@ -27,8 +27,8 @@ mimedict = static.loadMimeTypes()
_klassfuns = []
_klassfuns = []
def registerklassfun(fun):
_klassfuns.append(fun)
def registerklassfun(fun, debug=False ):
_klassfuns.append(( fun, debug) )
_filestoignore = {
_filestoignore = {
'.DS_Store': None
'.DS_Store': None
@@ -237,7 +237,7 @@ def dofileadd(path, name):
fobj = open(fsname)
fobj = open(fsname)
except:
except:
fobj = None
fobj = None
for i in itertools.chain(( ignoreFiles, ), _klassfuns, ( defFS, )):
for i, debug in itertools.chain(( ( ignoreFiles, False), ), _klassfuns, ( ( defFS, False) , )):
try:
try:
try:
try:
# incase the call expects a clean file
# incase the call expects a clean file
@@ -250,9 +250,9 @@ def dofileadd(path, name):
if klass is not None:
if klass is not None:
break
break
except:
except:
#import traceback
#traceback.print_exc(file=log.logfile)
pass
if debug:
import traceback
traceback.print_exc(file=log.logfile)
if klass is None or klass is IgnoreFile:
if klass is None or klass is IgnoreFile:
return None, None, None, None
return None, None, None, None