Fix header checker when copyright regex is None (#843)

Allow header_checker.py to work as it did before when no
copyright regex is defined.
This commit is contained in:
Paul Bartell 2022-08-18 11:24:11 -07:00 committed by GitHub
parent 2808e48079
commit 3693b3e8c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,10 @@ class HeaderChecker:
self.padding = padding self.padding = padding
self.header = header self.header = header
self.copyright_regex = re.compile(copyright_regex) if copyright_regex:
self.copyright_regex = re.compile(copyright_regex)
else:
self.copyright_regex = None
# Construct mutated header for assembly files # Construct mutated header for assembly files
self.asm_header = [";" + line for line in header] self.asm_header = [";" + line for line in header]