filter out None c.times in list of potential times
authorDiane Trout <diane@ghic.org>
Fri, 20 Mar 2015 23:24:55 +0000 (16:24 -0700)
committerDiane Trout <diane@ghic.org>
Fri, 20 Mar 2015 23:24:55 +0000 (16:24 -0700)
htsworkflow/pipelines/runfolder.py

index b12af029ecd77de3bd71576733ab3b56f1264301..a5b98a606217cc1e4c09168a2bbe8f7034f554e6 100644 (file)
@@ -210,7 +210,7 @@ class PipelineRun(object):
         """
         if self._name is None:
           components = [self.image_analysis, self.bustard, self.gerald]
-          tmax = max([ c.time for c in components if c ])
+          tmax = max([ c.time for c in components if c and c.time ])
           timestamp = time.strftime('%Y-%m-%d', time.localtime(tmax))
           self._name = 'run_' + self.flowcell_id + "_" + timestamp + '.xml'
         return self._name