Catch another lookup error.
authorDiane Trout <diane@caltech.edu>
Thu, 11 Oct 2012 23:32:27 +0000 (16:32 -0700)
committerDiane Trout <diane@caltech.edu>
Thu, 11 Oct 2012 23:32:27 +0000 (16:32 -0700)
Apparently one of gerald_summary[read][lane] was a dictionary
and so threw a KeyError instead of an IndexError. I might as well
catch both.

htsworkflow/frontend/samples/views.py

index a53552ce7135637718e6fd1377836250b486bf61..7150d081bd64b7fd73bb119b23ca539b38419035 100644 (file)
@@ -309,7 +309,7 @@ def _summary_stats(flowcell_id, lane_id, library_id):
             read = key.read-1 if key.read is not None else 0
             try:
                 eland_summary.clusters = gerald_summary[read][key.lane].cluster
-            except IndexError as e:
+            except (IndexError, KeyError) as e:
                 eland_summary.clustes = None
             eland_summary.cycle_width = cycle_width
             if hasattr(eland_summary, 'genome_map'):