Change-Id: I0597053944aef49b9537fd8d492781fa76c05ad0
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
__author__ = 'Thanh Ha'
+import logging
import os
import re
import sys
+log = logging.getLogger(__name__)
+
def get_header_text(_file):
"""Scan a file and pulls out the license header.
code_header = get_header_text(code_file)
if not license_header in code_header:
- print('ERROR: {} is missing or has incorrect license header.'.format(code_file))
+ log.error('{} is missing or has incorrect license header.'.format(code_file))
return 1
return 0
if missing_license:
sys.exit(1)
- print('Scan completed did not detect any files missing license headers.')
+ log.info('Scan completed did not detect any files missing license headers.')