from os.path import getmtime
from contextlib import closing
-default_src_path = '/etc/invirt/master.yaml'
-default_cache_path = '/var/lib/invirt/cache.json'
-lock_path = '/var/lib/invirt/cache.lock'
+src_path = '/etc/invirt/master.yaml'
+cache_path = '/var/lib/invirt/cache.json'
+lock_path = '/var/lib/invirt/cache.lock'
-def load(src_path = default_src_path,
- cache_path = default_cache_path,
- force_refresh = False):
+def load(force_refresh = False):
"""
Try loading the configuration from the faster-to-load JSON cache at
cache_path. If it doesn't exist or is outdated, load the configuration