make sure default slice tags are sorted above all other lines
[sface.git] / sface / sfiprocess.py
index 9287acd..35f0ca9 100644 (file)
@@ -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]