# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. # # # Check for valid SMI copyright notices in source files. # import sys, os sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "lib", "python%d.%d" % sys.version_info[:2])) # Allow running from the source tree, using the modules in the source tree sys.path.insert(2, os.path.join(os.path.dirname(__file__), '..')) from onbld.Checks.Copyright import copyright ret = 0 for filename in sys.argv[1:]: try: fin = open(filename, 'r') except IOError, e: sys.stderr.write("failed to open '%s': %s\n" % (e.filename, e.strerror)) continue ret |= copyright(fin, output=sys.stdout) fin.close() sys.exit(ret)
# # Check for valid SMI copyright notices in source files. # import sys, os sys.path.insert( 1, os.path.join(os.path.dirname(__file__), "..", "lib", "python%d.%d" % sys.version_info[:2])) # Allow running from the source tree, using the modules in the source tree sys.path.insert(2, os.path.join(os.path.dirname(__file__), '..')) from onbld.Checks.Copyright import copyright ret = 0 for filename in sys.argv[1:]: try: fin = open(filename, 'r') except IOError, e: sys.stderr.write("failed to open '%s': %s\n" % (e.filename, e.strerror)) continue ret |= copyright(fin, output=sys.stdout) fin.close() sys.exit(ret)