displays if assigned or not, currently assigned first
[sface.git] / sfadata.py
index 43de038..1fc3708 100644 (file)
@@ -33,10 +33,12 @@ class SfaData:
                  'SFI_REGISTRY' : "http://www.planet-lab.org:12345",
                  'SFI_AM' : "http://www.planet-lab.org:12346",
                  'SFI_SM' : "http://www.planet-lab.org:12347",
-                 'SFAUI_VERBOSE' : False,
+                 'SFACE_VERBOSE' : False,
+                 'SFACE_DEBUG' : False,
                  }
 
-    def __init__(self):
+    # let the UI set the slicename if that was set by user
+    def __init__(self, slice=None):
         self.read_config()
 
     def read_config(self):
@@ -44,7 +46,7 @@ class SfaData:
         execfile(filename, SfaData.__dict__)
         for (k,v) in SfaData.defaults.items():
             if not hasattr(SfaData,k): setattr(SfaData,k,v)
-        if SfaData.SFAUI_VERBOSE:
+        if SfaData.SFACE_VERBOSE:
             print "After reading config from %s"%filename
             for (k,v) in SfaData.defaults.items():
                 print "%-20s: %r"%(k,getattr(SfaData,k))
@@ -101,10 +103,11 @@ class SfaData:
 
     def trace_command (self, command):
         self._trace=time.time()
-        if self.SFAUI_VERBOSE:
+        if self.SFACE_VERBOSE:
             print time.strftime('%M:%S'),'Invoking',' '.join(command)
+
     def trace_end (self):
-        if self.SFAUI_VERBOSE:
+        if self.SFACE_VERBOSE:
             print time.strftime('%M:%S'),"[%.3f s]"%(time.time()-self._trace),'Done'
 
     def getRecord(self, hrn):