From: david-sarah Date: Wed, 12 Oct 2011 23:36:09 +0000 (-0700) Subject: misc/check-interfaces.py: print a warning if a .pyc or .pyo file exists without a... X-Git-Url: https://git.rkrishnan.org/components/%22news.html/COPYING.GPL?a=commitdiff_plain;h=cbd0569e4544c6fa9b252145dec493b3694c58c5;p=tahoe-lafs%2Ftahoe-lafs.git misc/check-interfaces.py: print a warning if a .pyc or .pyo file exists without a corresponding .py file. --- diff --git a/misc/coding_tools/check-interfaces.py b/misc/coding_tools/check-interfaces.py index 8d648716..15e7d99b 100644 --- a/misc/coding_tools/check-interfaces.py +++ b/misc/coding_tools/check-interfaces.py @@ -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('/', '.')