Index: /trunk/packages/sipb-xen-base/debian/changelog
===================================================================
--- /trunk/packages/sipb-xen-base/debian/changelog	(revision 795)
+++ /trunk/packages/sipb-xen-base/debian/changelog	(revision 796)
@@ -5,9 +5,10 @@
     formatting composite nodes as yaml, allowing the root
   * fix bug in late-import of yaml in invirt.config
-
+  * use yaml.CSafeDumper and yaml.CSafeLoader everywhere
+  
   [ Yang Zhang ]
   * added shared lock around cache-reading transaction
 
- -- Yang Zhang <y_z@mit.edu>  Wed, 30 Jul 2008 21:56:07 -0400
+ -- Greg Price <price@mit.edu>  Wed, 30 Jul 2008 22:11:15 -0400
 
 sipb-xen-base (8.11) unstable; urgency=low
Index: /trunk/packages/sipb-xen-base/files/usr/sbin/invirt-getconf
===================================================================
--- /trunk/packages/sipb-xen-base/files/usr/sbin/invirt-getconf	(revision 795)
+++ /trunk/packages/sipb-xen-base/files/usr/sbin/invirt-getconf	(revision 796)
@@ -80,5 +80,6 @@
             else:
                 import yaml
-                yaml.safe_dump(conf, stdout, default_flow_style=False)
+                yaml.dump(conf, stdout,
+                          Dumper=yaml.CSafeDumper, default_flow_style=False)
     except invirt_exception, ex:
         print >> stderr, ex
Index: /trunk/packages/sipb-xen-base/files/usr/share/python-support/sipb-xen-base/invirt/config.py
===================================================================
--- /trunk/packages/sipb-xen-base/files/usr/share/python-support/sipb-xen-base/invirt/config.py	(revision 795)
+++ /trunk/packages/sipb-xen-base/files/usr/share/python-support/sipb-xen-base/invirt/config.py	(revision 796)
@@ -35,5 +35,6 @@
         @with_lock_file(lock_file, False)
         def read_cache():
-            try: ns.cfg = with_closing(file(cache_path))(lambda f: json.read(f.read()))
+            try: ns.cfg = with_closing(file(cache_path)) (
+                lambda f: json.read(f.read()))
             except: ns.do_refresh = True
 
@@ -45,8 +46,8 @@
         def refresh_cache():
             import yaml
-            try:    default_loader = yaml.CSafeLoader
-            except: default_loader = yaml.SafeLoader
-            ns.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(ns.cfg)))
+            ns.cfg = with_closing(file(src_path)) (
+                lambda f: yaml.load(f, yaml.CSafeLoader))
+            try: with_closing(file(cache_path, 'w')) (
+                lambda f: f.write(json.write(ns.cfg)))
             except: pass # silent failure
     return ns.cfg
