Fix an issue where an unlicensed system would throw errors

In the case where the license was entirely not present but the tower
license module was present
This commit is contained in:
Matthew Jones
2017-07-14 10:20:53 -04:00
parent f5bbccf0cd
commit 891f26c850
4 changed files with 4 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ def get_licensed_features():
def feature_enabled(name):
"""Return True if the requested feature is enabled, False otherwise."""
validated_license_data = _get_validated_license_data()
if validated_license_data['license_type'] == 'open':
if validated_license_data.get('license_type', 'UNLICENSED') == 'open':
return True
return validated_license_data.get('features', {}).get(name, False)