Index: trunk/ippToPsps/jython/batch.py
===================================================================
--- trunk/ippToPsps/jython/batch.py	(revision 32588)
+++ trunk/ippToPsps/jython/batch.py	(revision 32589)
@@ -54,8 +54,14 @@
         self.logger.debug("Batch class constructor")
 
-        # check FITS file is ok - TODO could be neater
+        # check FITS file is ok
         if self.fits: 
             self.header = self.fits.getPrimaryHeader()
+
+            # now check that the fits header is readable
             if not self.header: return
+
+        # if no fits file, and this is not an IN batch, then get out of here
+        else:
+           if batchType != "IN": return
 
         # set up class variables
@@ -91,12 +97,4 @@
         # create datastore object
         self.datastore = Datastore(self.logger, self.doc, self.ippToPspsDb)
-
-        # create a new batch
-        #self.batchID = self.ippToPspsDb.createNewBatch( 
-        #       self.batchType, 
-        #        self.id,
-        #        self.survey,
-        #        self.dvoGpc1Label, 
-        #        self.datastore.product)
 
         # get local storage location from config
@@ -265,19 +263,8 @@
         else: root.attrib['maxObjId'] = str(self.maxObjID)
 
-        # get md5sum
-        #p = Popen("md5sum " + self.outputFitsPath, shell=True, stdout=PIPE)
-        #p.wait()
-        #out = p.stdout.read()
-        #md5sum = out[0:out.rfind(" ")]
-
-        # get file size
-        #fileSize = os.path.getsize(self.outputFitsPath)
-
         # file information
         child = Element('file')
         root.append(child)
         child.attrib['name'] = self.outputFitsFile
-        #child.attrib['bytes'] = str(fileSize)
-        #child.attrib['md5'] = md5sum
 
         # now create doc and write to file
