Index: trunk/ippToPsps/jython/batch.py
===================================================================
--- trunk/ippToPsps/jython/batch.py	(revision 35174)
+++ trunk/ippToPsps/jython/batch.py	(revision 35417)
@@ -276,4 +276,7 @@
             p = Popen(cmd, shell=True, stdout=PIPE)
             p.wait()
+            if p.returncode != 0:
+                self.logger.errorPair("error running xmllint for ", tmpPath)
+                raise
         except:
             self.logger.errorPair("Popen failed", cmd)
@@ -301,5 +304,4 @@
         p = Popen(cmd, shell=True, stdout=PIPE)
         p.wait()
-
         if p.returncode != 0:
             self.logger.errorPair("tar command", "failed")
@@ -311,5 +313,4 @@
         p = Popen(cmd, shell=True, stdout=PIPE)
         p.wait()
-
         if p.returncode != 0:
             self.logger.errorPair("gzip command", "failed")
@@ -415,5 +416,5 @@
 
           # drop any previous tables before import
-          #self.scratchDb.dropTable(table.name)
+          self.scratchDb.dropTable(table.name)
 
           # IPP FITS files are littered with infinities, so remove these
@@ -426,6 +427,6 @@
           try:
               table.write(self.scratchDb.url + '#' + table.name)
-              # print "wrote to mysql ", table
-              self.scratchDb.killLastConnectionID()
+              # XXX this one is not needed
+              # self.scratchDb.killLastConnectionID()
               count = count + 1
           except:
@@ -454,4 +455,5 @@
            # get everything from table
            try:
+               print "reading table from mysql ", table
                _table = stilts.tread(self.scratchDb.url + '#SELECT * FROM ' + table)
                self.scratchDb.killLastConnectionID()
@@ -518,4 +520,7 @@
         p = Popen(cmd, shell=True, stdout=PIPE)
         p.wait()
+        if p.returncode != 0:
+            self.logger.errorPair("dvograbber command", "failed")
+            return False
 
         rowCount = self.scratchDb.getRowCount("dvoDetection")
@@ -554,4 +559,8 @@
 
         if not self.populatePspsTables():
+            if self.skipBatch:
+                self.ippToPspsDb.updateProcessed(self.batchID, -1)
+                return True
+
             self.logger.errorPair("Aborting this batch", "unable to populate PSPS tables")
             self.ippToPspsDb.updateProcessed(self.batchID, -1)
