Comment out the load of the resource label file, pending a solution to the
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 28 Jun 2006 16:36:38 +0000 (17:36 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 28 Jun 2006 16:36:38 +0000 (17:36 +0100)
problem that we now require xml.marshal.generic.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/util/security.py

index 9749d6b5c6f7b34261d28954f81624c5ce434a38..df970f355e27e4c5446194bf29fd3784d7e491de 100644 (file)
@@ -22,7 +22,7 @@ import logging
 import sys, os, string, re
 import traceback
 import shutil
-from xml.marshal import generic
+#from xml.marshal import generic
 from xen.lowlevel import acm
 from xen.xend import sxp
 from xen.xend.XendLogging import log
@@ -555,13 +555,16 @@ def get_res_label(resource):
     if not os.path.isfile(configfile):
         log.info("Resource label file not found.")
         return default_res_label()
-    fd = open(configfile, "rb")
-    res_label_cache = generic.load(fd)
-    fd.close()
+#
+# Commented out pending replacement for xml.marshal.generic
+#
+#     fd = open(configfile, "rb")
+#     res_label_cache = generic.load(fd)
+#     fd.close()
 
-    # find the resource information
-    if res_label_cache.has_key(resource):
-        (policy, label) = res_label_cache[resource]
+    # find the resource information
+    if res_label_cache.has_key(resource):
+        (policy, label) = res_label_cache[resource]
 
     return (label, policy)