Skip to content

Commit 9cb2f17

Browse files
committed
Added a refinement to the pyflakes management command, to make it clearer where exceptions while running pyflakes originate.
- Legacy-Id: 8747
1 parent 8b5796e commit 9cb2f17

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ietf/utils/management/commands/pyflakes.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ def checkPaths(filenames, verbosity):
9292
for dirpath, dirnames, filenames in os.walk(arg):
9393
for filename in filenames:
9494
if filename.endswith('.py'):
95-
warnings.extend(checkPath(os.path.join(dirpath, filename), verbosity))
95+
try:
96+
warnings.extend(checkPath(os.path.join(dirpath, filename), verbosity))
97+
except TypeError as e:
98+
print("Exception while processing dirpath=%s, filename=%s: %s" % (dirpath, filename,e ))
99+
raise
96100
else:
97101
warnings.extend(checkPath(arg, verbosity))
98102
return warnings

0 commit comments

Comments
 (0)