renamed sfawindow into mainwindow
[sface.git] / sface / sfiprocess.py
index 27c5b7c..cd24f9a 100644 (file)
@@ -3,7 +3,7 @@ import os
 import time
 
 from PyQt4.QtCore import *
-from sface.sficonfig import config
+from sface.config import config
 
 def find_executable(exec_name):
     """find the given executable in $PATH"""
@@ -25,6 +25,9 @@ class SfiProcess(QObject):
             self.args << QString(arg)
 
         self.exe = find_executable("sfi.py")
+        if not self.exe:
+            print "FATAL.. Could not locate binary sfi.py - not much we can do without that"
+
         self.process = QProcess()
 
         self.connect(self.process, SIGNAL("finished(int, QProcess::ExitStatus)"),
@@ -43,7 +46,7 @@ class SfiProcess(QObject):
         except:
             pass
         args = ["-u", config.getUser(), "-a", config.getAuthority(), 
-                "-r", config.registry(), "-s", mgr, "resources", 
+                "-r", config.getRegistry(), "-s", mgr, "resources", 
                 "-o", filename, slice]
 
         self.__init_command(args)
@@ -51,14 +54,14 @@ class SfiProcess(QObject):
         return filename
 
     def getRSpecFromSM(self):
-        return self.__getRSpec(config.slicemgr())
+        return self.__getRSpec(config.getSlicemgr())
 
     def getRSpecFromAM(self):
-        return self.__getRSpec(config.aggmgr())
+        return self.__getRSpec(config.getAggmgr())
 
     def getRecord(self, hrn):
         args = ["-u", config.getUser(), "-a", config.getAuthority(), 
-                "-r", config.registry(), "-s", config.slicemgr(), "show", hrn]
+                "-r", config.getRegistry(), "-s", config.getSlicemgr(), "show", hrn]
         self.__init_command(args)
         self.start()
 
@@ -71,12 +74,12 @@ class SfiProcess(QObject):
             return self.process.readAll()
 
     def trace_command (self):
-        if config.SFACE_VERBOSE:
+        if config.verbose:
             self._trace=time.time()
             command = "%s %s" % (self.exe, self.args.join(" "))
             print time.strftime('%M:%S'),'Invoking',command
 
     def trace_end (self):
-        if config.SFACE_VERBOSE:
+        if config.verbose:
             command = "%s %s" % (self.exe, self.args.join(" "))
             print time.strftime('%M:%S'),"[%.3f s]"%(time.time()-self._trace),command,'Done'