diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index ef836d6e2da4b6633ae08580b93058635c78a58f..d1a34a920dcda0b9f9bc9445bdc23ff2ecd5de45 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -131,8 +131,14 @@ def log(cond, why, filename): # scan files, validate the text ok = True -for filename in subprocess.check_output(FILE_LIST_COMMAND, - shell=True).splitlines(): +filename_list = [] +try: + filename_list = subprocess.check_output(FILE_LIST_COMMAND, + shell=True).splitlines() +except subprocess.CalledProcessError: + sys.exit(0) + +for filename in filename_list: if filename in KNOWN_BAD: continue ext = os.path.splitext(filename)[1] base = os.path.basename(filename)