Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def db_configs(self, name):
if len(self._db_configs) == 0:
config.init()
for (nme, urls) in config.DATABASES.items():
if not urls:
continue
# we don't support multi-configs of dictionary format yet; the "else [urls]" is for a dictionary
url_list = re.split(r'\s+', urls) if isinstance(urls, str) else [urls]
self._db_configs[nme] = list(map(lambda x: DatabaseConfig(x), url_list))
return self._db_configs[name]