mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
misc/check-interfaces.py: print a warning if a .pyc or .pyo file exists without a corresponding .py file.
This commit is contained in:
parent
5ae446fbd2
commit
cbd0569e45
@ -65,6 +65,10 @@ def check():
|
||||
for (dirpath, dirnames, filenames) in os.walk(srcdir):
|
||||
for fn in filenames:
|
||||
(basename, ext) = os.path.splitext(fn)
|
||||
if ext in ('.pyc', '.pyo') and not os.path.exists(os.path.join(dirpath, basename+'.py')):
|
||||
print >>sys.stderr, ("Warning: no .py source file for %r.\n"
|
||||
% (os.path.join(dirpath, fn),))
|
||||
|
||||
if ext == '.py' and not excluded_file_basenames.match(basename):
|
||||
relpath = os.path.join(dirpath[len(srcdir)+1:], basename)
|
||||
module = relpath.replace(os.sep, '/').replace('/', '.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user