summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
75fb144)
svn path=/trunk/packages/sipb-xen-base/; revision=784
from invirt.common import *
from os.path import getmtime
from invirt.common import *
from os.path import getmtime
# written.
@with_lock_file('/var/lib/invirt/cache.lock')
def cfg():
# written.
@with_lock_file('/var/lib/invirt/cache.lock')
def cfg():
cfg = with_closing(file(src_path))(lambda f: yaml.load(f, default_loader))
try: with_closing(file(cache_path, 'w'))(lambda f: f.write(json.write(cfg)))
except: pass # silent failure
cfg = with_closing(file(src_path))(lambda f: yaml.load(f, default_loader))
try: with_closing(file(cache_path, 'w'))(lambda f: f.write(json.write(cfg)))
except: pass # silent failure