Changeset 1420 for trunk/packages
- Timestamp:
- Oct 29, 2008, 12:44:42 AM (16 years ago)
- Location:
- trunk/packages/invirt-base
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-base/debian/changelog
r1332 r1420 1 invirt-base (0.0.2) unstable; urgency=low 2 3 * eliminate choice of source and cache files for invirt.config.load and 4 invirt-getconf, so we can make it more complex 5 6 -- Greg Price <price@mit.edu> Tue, 28 Oct 2008 21:16:14 -0400 7 1 8 invirt-base (0.0.1) unstable; urgency=low 2 9 -
trunk/packages/invirt-base/python/invirt/config.py
r1330 r1420 7 7 from contextlib import closing 8 8 9 default_src_path = '/etc/invirt/master.yaml'10 default_cache_path = '/var/lib/invirt/cache.json'11 lock_path 9 src_path = '/etc/invirt/master.yaml' 10 cache_path = '/var/lib/invirt/cache.json' 11 lock_path = '/var/lib/invirt/cache.lock' 12 12 13 def load(src_path = default_src_path, 14 cache_path = default_cache_path, 15 force_refresh = False): 13 def load(force_refresh = False): 16 14 """ 17 15 Try loading the configuration from the faster-to-load JSON cache at -
trunk/packages/invirt-base/scripts/invirt-getconf
r1330 r1420 17 17 """ 18 18 19 from invirt .config import load19 from invirt import config 20 20 from sys import argv, exit, stderr, stdout 21 21 from optparse import OptionParser … … 27 27 parser = OptionParser(usage = '%prog [options] key', 28 28 description = __doc__.strip().split('\n\n')[0]) 29 parser.add_option('-s', '--src',30 default = '/etc/invirt/master.yaml',31 help = 'the source YAML configuration file to read from')32 parser.add_option('-c', '--cache',33 default = '/var/lib/invirt/invirt.json',34 help = 'path to the JSON cache')35 29 parser.add_option('-r', '--refresh', 36 30 action = 'store_true', … … 48 42 components = [] 49 43 50 conf = load(opts.src, opts.cache,opts.refresh)44 conf = config.load(opts.refresh) 51 45 for i, component in enumerate(components): 52 46 progress = '.'.join(components[:i])
Note: See TracChangeset
for help on using the changeset viewer.