X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sfadata.py;h=1fc3708757aa5d911aebec77b3babaded21a8b50;hp=040a0baead23da30731a0261b4fdeff01c8adf73;hb=e8b04dd7ddc2ffb22d72098400cdbf676453a094;hpb=9f5557b0f0541b6e1a9d36a48ee660b86076d4cd diff --git a/sfadata.py b/sfadata.py index 040a0ba..1fc3708 100644 --- a/sfadata.py +++ b/sfadata.py @@ -22,7 +22,7 @@ def process(command): arguments << QString(c) process = QProcess() process.start(SFI_CMD, arguments) - process.waitForFinished() + process.waitForFinished( 200000 ) print process.readAll() @@ -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):