fixed broken slice-creation
[nodemanager.git] / tools.py
index 122b321..0acf035 100644 (file)
--- a/tools.py
+++ b/tools.py
@@ -1,3 +1,6 @@
+# $Id$
+# $URL$
+
 """A few things that didn't seem to fit anywhere else."""
 
 import cPickle
@@ -78,7 +81,7 @@ def fork_as(su, function, *args):
         except:
             os.seteuid(os.getuid())  # undo su so we can write the log file
             os.setegid(os.getgid())
-            logger.log_exc()
+            logger.log_exc("tools.fork_as")
         os._exit(0)
     else: os.waitpid(child_pid, 0)
 
@@ -125,18 +128,6 @@ def node_id():
             _node_id=""
     return _node_id
 
-# get slicefamily from /etc/planetlab/slicefamily and cache it
-# http://svn.planet-lab.org/wiki/SliceFamily
-_slicefamily=None
-def slicefamily():
-    global _slicefamily
-    if _slicefamily is None:
-        try:
-            _slicefamily=file("/etc/planetlab/slicefamily").read().strip()
-        except:
-            _slicefamily=""
-    return _slicefamily
-
 _root_context_arch=None
 def root_context_arch():
     global _root_context_arch