Ignore:
Timestamp:
Jul 30, 2008, 9:39:00 PM (16 years ago)
Author:
price
Message:

fix bug in late-import of yaml in invirt.config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-base/files/usr/share/python-support/sipb-xen-base/invirt/config.py

    r784 r792  
    55default_src_path   = '/etc/invirt/master.yaml'
    66default_cache_path = '/var/lib/invirt/cache.json'
    7 
    8 try:    default_loader = yaml.CSafeLoader
    9 except: default_loader = yaml.SafeLoader
    107
    118def load(src_path = default_src_path,
     
    3835        def cfg():
    3936            import yaml
     37            try:    default_loader = yaml.CSafeLoader
     38            except: default_loader = yaml.SafeLoader
    4039            cfg = with_closing(file(src_path))(lambda f: yaml.load(f, default_loader))
    4140            try: with_closing(file(cache_path, 'w'))(lambda f: f.write(json.write(cfg)))
Note: See TracChangeset for help on using the changeset viewer.