Changeset 1423
- Timestamp:
- Oct 29, 2008, 12:44:46 AM (16 years ago)
- Location:
- trunk/packages/invirt-base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-base/debian/changelog
r1422 r1423 4 4 invirt-getconf, so we can do what follows 5 5 * look in /etc/invirt/conf.d/ as well as /etc/invirt/master.yaml 6 7 -- Greg Price <price@mit.edu> Tue, 28 Oct 2008 21:16:14 -0400 6 * use run-parts semantics in /etc/invirt/conf.d/ 7 8 -- Greg Price <price@mit.edu> Wed, 29 Oct 2008 00:10:36 -0400 8 9 9 10 invirt-base (0.0.1) unstable; urgency=low -
trunk/packages/invirt-base/python/invirt/config.py
r1422 r1423 8 8 from contextlib import closing 9 9 import yaml 10 import re 10 11 11 12 try: loader = yaml.CSafeLoader … … 34 35 return d1 35 36 37 def run_parts_list(dirname): 38 """Reimplements Debian's run-parts --list. 39 40 One difference from run-parts's behavior: run-parts --list /foo/ 41 will give output like /foo//bar, because Python code tends to expect this. 42 43 Matches documented behavior of run-parts in debianutils v2.28.2, dated 2007. 44 """ 45 # From run-parts(8). 46 lanana_re = re.compile('^[a-z0-9]+$') 47 lsb_re = re.compile('^_?([a-z0-9_.]+-)+[a-z0-9]+$') 48 deb_cron_re = re.compile('^[a-z0-9][a-z0-9-]*$') 49 for name in os.listdir(dirname): 50 if lanana_re.match(name) or lsb_re.match(name) or deb_cron_re.match(name): 51 yield os.path.join(dirname, name) 52 36 53 def list_files(): 37 54 yield src_path 38 for name in os.listdir(src_dirpath):39 yield os.path.join(src_dirpath, name)55 for name in run_parts_list(src_dirpath): 56 yield name 40 57 41 58 def load_master():
Note: See TracChangeset
for help on using the changeset viewer.