From 769fe1872425a848fa7464631360afa79d7227ab Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 25 Jan 2016 20:58:49 -0500 Subject: [PATCH] Wrap up other places where the old license access method is used --- awx/api/management/commands/uses_mongo.py | 2 +- awx/main/access.py | 2 +- awx/main/management/commands/inventory_import.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/api/management/commands/uses_mongo.py b/awx/api/management/commands/uses_mongo.py index 267c389d62..8ea6404f4a 100644 --- a/awx/api/management/commands/uses_mongo.py +++ b/awx/api/management/commands/uses_mongo.py @@ -28,7 +28,7 @@ class Command(BaseCommand): def handle(self, *args, **kwargs): # Get the license data. license_reader = TaskSerializer() - license_data = license_reader.from_file() + license_data = license_reader.from_database() # Does the license have features, at all? # If there is no license yet, then all features are clearly off. diff --git a/awx/main/access.py b/awx/main/access.py index 1508773cdb..de2f69a914 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -148,7 +148,7 @@ class BaseAccess(object): def check_license(self, add_host=False, feature=None, check_expiration=True): reader = TaskSerializer() - validation_info = reader.from_file() + validation_info = reader.from_database() if ('test' in sys.argv or 'jenkins' in sys.argv) and not os.environ.get('SKIP_LICENSE_FIXUP_FOR_TEST', ''): validation_info['free_instances'] = 99999999 validation_info['time_remaining'] = 99999999 diff --git a/awx/main/management/commands/inventory_import.py b/awx/main/management/commands/inventory_import.py index ae5eeb8a25..964389d560 100644 --- a/awx/main/management/commands/inventory_import.py +++ b/awx/main/management/commands/inventory_import.py @@ -1180,7 +1180,7 @@ class Command(NoArgsCommand): def check_license(self): reader = LicenseReader() - license_info = reader.from_file() + license_info = reader.from_database() if not license_info or len(license_info) == 0: self.logger.error(LICENSE_NON_EXISTANT_MESSAGE) raise CommandError('No Tower license found!')