diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index eedb03e90..f9c85c0a9 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -127,24 +127,6 @@ class RequestProvider(object): class AirtimeApiClient(object): - - # This is a little hacky fix so that I don't have to pass the config object - # everywhere where AirtimeApiClient needs to be initialized - default_config = None - # the purpose of this custom constructor is to remember which config file - # it was called with. So that after the initial call: - # AirtimeApiClient.create_right_config('/path/to/config') - # All subsequence calls to create_right_config will be with that config - # file - @staticmethod - def create_right_config(log=None,config_path=None): - if config_path: AirtimeApiClient.default_config = config_path - elif (not AirtimeApiClient.default_config): - raise ValueError("Cannot slip config_path attribute when it has \ - never been passed yet") - return AirtimeApiClient( logger=None, - config_path=AirtimeApiClient.default_config ) - def __init__(self, logger=None,config_path='/etc/airtime/api_client.cfg'): if logger is None: self.logger = logging else: self.logger = logger