From fffc2bbe0ad34db938d95251b211b9d2f29cff9a Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Thu, 10 Dec 2009 23:03:45 +0100 Subject: [PATCH] only check .py files (for now), because others usually don't have a license. --- hg/licensecheck.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hg/licensecheck.py b/hg/licensecheck.py index 90037ec..e3dcb37 100644 --- a/hg/licensecheck.py +++ b/hg/licensecheck.py @@ -18,10 +18,15 @@ import os from mercurial import hg +types_to_check = [ ".py" ]; + def checkfile( filename ): + if os.path.splitext( filename )[1] not in types_to_check: + return True; try: fileproc = os.popen( 'licensecheck %s' % filename ); result = fileproc.read().strip(); + print( "Licensecheck: " + result ); return not result.endswith( "*No copyright* UNKNOWN" ); finally: fileproc.close();