projects
/
invirt/packages/invirt-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
75fb144
)
lazily import yaml for faster module load times
author
Yang Zhang
<y_z@mit.edu>
Wed, 30 Jul 2008 03:39:06 +0000
(23:39 -0400)
committer
Yang Zhang
<y_z@mit.edu>
Wed, 30 Jul 2008 03:39:06 +0000
(23:39 -0400)
svn path=/trunk/packages/sipb-xen-base/; revision=784
files/usr/share/python-support/sipb-xen-base/invirt/config.py
patch
|
blob
|
history
diff --git
a/files/usr/share/python-support/sipb-xen-base/invirt/config.py
b/files/usr/share/python-support/sipb-xen-base/invirt/config.py
index
02409a4
..
cd0a9d4
100644
(file)
--- a/
files/usr/share/python-support/sipb-xen-base/invirt/config.py
+++ b/
files/usr/share/python-support/sipb-xen-base/invirt/config.py
@@
-1,4
+1,4
@@
-import json, yaml
+import json
from invirt.common import *
from os.path import getmtime
@@
-36,6
+36,7
@@
def load(src_path = default_src_path,
# written.
@with_lock_file('/var/lib/invirt/cache.lock')
def cfg():
+ import yaml
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