mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 21:07:39 -02:30
cleanup more old licensing cruft
This commit is contained in:
@@ -93,22 +93,10 @@ register(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _load_default_license_from_file():
|
|
||||||
try:
|
|
||||||
license_file = os.environ.get('AWX_LICENSE_FILE', '/etc/tower/license')
|
|
||||||
if os.path.exists(license_file):
|
|
||||||
license_data = json.load(open(license_file))
|
|
||||||
logger.debug('Read license data from "%s".', license_file)
|
|
||||||
return license_data
|
|
||||||
except Exception:
|
|
||||||
logger.warning('Could not read license from "%s".', license_file, exc_info=True)
|
|
||||||
return {}
|
|
||||||
|
|
||||||
|
|
||||||
register(
|
register(
|
||||||
'LICENSE',
|
'LICENSE',
|
||||||
field_class=fields.DictField,
|
field_class=fields.DictField,
|
||||||
default=_load_default_license_from_file,
|
default=lambda: {},
|
||||||
label=_('License'),
|
label=_('License'),
|
||||||
help_text=_('The license controls which features and functionality are '
|
help_text=_('The license controls which features and functionality are '
|
||||||
'enabled. Use /api/v2/config/ to update or change '
|
'enabled. Use /api/v2/config/ to update or change '
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user