X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fsfiprocess.py;h=f8dc2065459dcc7fec9889a679e015fe80d0cfb3;hp=9287acd1397b850a0b32aaea5ba2333f90ae887b;hb=81bcf92e5a2aa133bba83df3f0de69af7ebcea20;hpb=03b467d0bf99663f894553af50265816bd28027e diff --git a/sface/sfiprocess.py b/sface/sfiprocess.py index 9287acd..f8dc206 100644 --- a/sface/sfiprocess.py +++ b/sface/sfiprocess.py @@ -13,7 +13,7 @@ def find_executable(exec_name): paths = os.getenv("PATH").split(':') for p in paths: exec_path = os.path.join(p, exec_name) - if os.path.exists(exec_path): + if os.path.exists(exec_path) and os.access(exec_path,os.X_OK): return exec_path return None @@ -64,7 +64,15 @@ class SfiProcess(QObject): output = self.process.readAllStandardOutput() self.output = self.output + output if config.debug: - print output + try: + print output + except IOError, e: + if (e.errno == 4): + # XXX why is this happening?? + print "*** caught EINTR" + else: + raise + def processStandardError(self): print self.process.readAllStandardError() @@ -196,6 +204,21 @@ class SfiProcess(QObject): self.__init_command(args) self.start() + def deleteSlivers(self, slice=None, aggAddr=None, aggPort=None): + if not slice: + slice = config.getSlice() + + args = ["-u", config.getUser(), "-a", config.getAuthority(), + "-r", config.getRegistry(), "-s", config.getSlicemgr(), "delete"] + + if aggAddr: + args = args + ["-a", aggAddr, "-p", str(aggPort)] + + args = args + [slice] + + self.__init_command(args) + self.start() + def updateRecord(self, filename): args = ["-u", config.getUser(), "-a", config.getAuthority(), "-r", config.getRegistry(), "-s", config.getSlicemgr(), "update", filename]