Allow empty license headers being applied to files

refs #6309
This commit is contained in:
Johannes Meyer 2014-07-15 12:50:58 +02:00
parent e7a8c3bec3
commit 39cd4a436b
1 changed files with 6 additions and 2 deletions

View File

@ -191,6 +191,9 @@ def get_license(type):
try:
return __LICENSE_STORE[type]
except(KeyError):
if not LICENSE_DATA:
__LICENSE_STORE[type] = ''
return ''
config = FILE_TYPE_CONFIG[type]
license_data = []
license_data.extend([''] * config['linesBefore'])
@ -239,6 +242,7 @@ def replace_text(org_data, license_data):
test = True
elif SECTION_MARKER.search(line) and test == True:
test = False
if license_data:
out += license_data
out += '\n'
elif test == True: