From d47f8f577e358b4e7a71b15a905040e5d3b079d4 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 27 Apr 2016 09:14:54 -0400 Subject: [PATCH] Fixup exception handling in mothur datatypes. --- lib/galaxy/datatypes/mothur.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/galaxy/datatypes/mothur.py b/lib/galaxy/datatypes/mothur.py index 05312449a91..a17a5f07cba 100644 --- a/lib/galaxy/datatypes/mothur.py +++ b/lib/galaxy/datatypes/mothur.py @@ -300,7 +300,7 @@ class DistanceMatrix(Text): try: dataset.metadata.sequence_count = int(''.join(line)) # seq count sometimes preceded by tab break - except Exception, e: + except Exception as e: log.warn("DistanceMatrix set_meta %s" % e) @@ -608,7 +608,7 @@ class Frequency(Tabular): try: int(line[0]) float(line[1]) - except: + except Exception: return False count += 1 if count > 1: @@ -658,7 +658,7 @@ class Quantile(Tabular): float(line[4]) float(line[5]) float(line[6]) - except: + except Exception: return False count += 1 if count > 0: @@ -780,7 +780,7 @@ class RefTaxonomy(Tabular): if len(line) == 3: try: int(line[2]) - except: + except Exception: return False count += 1 @@ -901,7 +901,7 @@ class SffFlow(Tabular): try: flow_values = int(headers[0][0]) dataset.metadata.flow_values = flow_values - except Exception, e: + except Exception as e: log.warn("SffFlow set_meta %s" % e) def make_html_table(self, dataset, skipchars=[]): @@ -919,7 +919,7 @@ class SffFlow(Tabular): out += '' out += self.make_html_peek_rows(dataset, skipchars=skipchars) out += '' - except Exception, exc: + except Exception as exc: out = "Can't create peek %s" % str(exc) return out