From 3d16aa62fa8e5dc2d47e92e0a8eaa1ece27fb7ee Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 3 Jul 2017 13:23:52 +0200 Subject: [PATCH] Also remove the inner try/except --- lib/galaxy/datatypes/tabular.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/galaxy/datatypes/tabular.py b/lib/galaxy/datatypes/tabular.py index 4eb3a2764f3..0cfac465c58 100644 --- a/lib/galaxy/datatypes/tabular.py +++ b/lib/galaxy/datatypes/tabular.py @@ -798,18 +798,15 @@ class Eland( Tabular ): line_pieces = line.split('\t') if len(line_pieces) != 22: return False - try: - if long(line_pieces[1]) < 0: - raise Exception('Out of range') - if long(line_pieces[2]) < 0: - raise Exception('Out of range') - if long(line_pieces[3]) < 0: - raise Exception('Out of range') - int(line_pieces[4]) - int(line_pieces[5]) - # can get a lot more specific - except ValueError: - return False + if long(line_pieces[1]) < 0: + raise Exception('Out of range') + if long(line_pieces[2]) < 0: + raise Exception('Out of range') + if long(line_pieces[3]) < 0: + raise Exception('Out of range') + int(line_pieces[4]) + int(line_pieces[5]) + # can get a lot more specific count += 1 if count == 5: break