Added a refinement to the pyflakes management command, to make it clearer where exceptions while running pyflakes originate.
- Legacy-Id: 8747
This commit is contained in:
parent
8b5796ef8f
commit
9cb2f17f0f
|
@ -92,7 +92,11 @@ def checkPaths(filenames, verbosity):
|
|||
for dirpath, dirnames, filenames in os.walk(arg):
|
||||
for filename in filenames:
|
||||
if filename.endswith('.py'):
|
||||
warnings.extend(checkPath(os.path.join(dirpath, filename), verbosity))
|
||||
try:
|
||||
warnings.extend(checkPath(os.path.join(dirpath, filename), verbosity))
|
||||
except TypeError as e:
|
||||
print("Exception while processing dirpath=%s, filename=%s: %s" % (dirpath, filename,e ))
|
||||
raise
|
||||
else:
|
||||
warnings.extend(checkPath(arg, verbosity))
|
||||
return warnings
|
||||
|
|
Loading…
Reference in a new issue