mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
e7a8c3bec3
commit
39cd4a436b
@ -191,6 +191,9 @@ def get_license(type):
|
|||||||
try:
|
try:
|
||||||
return __LICENSE_STORE[type]
|
return __LICENSE_STORE[type]
|
||||||
except(KeyError):
|
except(KeyError):
|
||||||
|
if not LICENSE_DATA:
|
||||||
|
__LICENSE_STORE[type] = ''
|
||||||
|
return ''
|
||||||
config = FILE_TYPE_CONFIG[type]
|
config = FILE_TYPE_CONFIG[type]
|
||||||
license_data = []
|
license_data = []
|
||||||
license_data.extend([''] * config['linesBefore'])
|
license_data.extend([''] * config['linesBefore'])
|
||||||
@ -239,8 +242,9 @@ def replace_text(org_data, license_data):
|
|||||||
test = True
|
test = True
|
||||||
elif SECTION_MARKER.search(line) and test == True:
|
elif SECTION_MARKER.search(line) and test == True:
|
||||||
test = False
|
test = False
|
||||||
out += license_data
|
if license_data:
|
||||||
out += '\n'
|
out += license_data
|
||||||
|
out += '\n'
|
||||||
elif test == True:
|
elif test == True:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user