From 97a52ed775c4e565fddb8f0f9fb98be7ad5e8713 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 8 Oct 2013 11:51:13 -0400 Subject: [PATCH] Attempt to relocate convention for 'super tenant' to more definitively segregate the two concepts --- confluent/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/confluent/config.py b/confluent/config.py index b871618e..ff2d973d 100644 --- a/confluent/config.py +++ b/confluent/config.py @@ -202,7 +202,13 @@ class ConfigManager(object): def __init__(self, tenant, decrypt=False): global _cfgstore self.decrypt = decrypt - if 'tenant' not in _cfgstore: + if tenant is None: + self.tenant = None + if 'main' not in _cfgstore: + _cfgstore['main'] = {'id': None} + self._cfgstore = _cfgstore['main'] + return + elif 'tenant' not in _cfgstore: _cfgstore['tenant'] = {tenant: {'id': tenant}} self._bg_sync_to_file() elif tenant not in _cfgstore['tenant']: