Mercurial > repos > earlhaminst > gafa
diff gafa_datatypes.py @ 6:c15476d4271c draft
planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/GAFA/ commit af1fd308dde99cf40a9422c53dc680932be3765d
author | earlhaminst |
---|---|
date | Tue, 20 Mar 2018 11:06:51 -0400 |
parents | af9f72ddf7f9 |
children |
line wrap: on
line diff
--- a/gafa_datatypes.py Fri Mar 24 12:14:31 2017 -0400 +++ b/gafa_datatypes.py Tue Mar 20 11:06:51 2018 -0400 @@ -40,12 +40,17 @@ return False -# Since Binary.register_sniffable_binary_format() ignores the sniff order declared in datatypes_conf.xml and put TS datatypes at the end, instead of simply doing: +# Since in Galaxy < 18.01 Binary.register_sniffable_binary_format() ignores the +# sniff order declared in datatypes_conf.xml and put TS datatypes at the end, +# instead of simply doing: # Binary.register_sniffable_binary_format("sqlite", "sqlite", SQlite) # we need to register specialized SQLite datatypes before SQlite -for i, format_dict in enumerate(Binary.sniffable_binary_formats): - if format_dict['class'] == SQlite: - break -else: - i += 1 -Binary.sniffable_binary_formats.insert(i, {'type': 'gafa.sqlite', 'ext': 'gafa.sqlite', 'class': GAFASQLite}) +try: + for i, format_dict in enumerate(Binary.sniffable_binary_formats): + if format_dict['class'] == SQlite: + break + else: + i += 1 + Binary.sniffable_binary_formats.insert(i, {'type': 'gafa.sqlite', 'ext': 'gafa.sqlite', 'class': GAFASQLite}) +except AttributeError: + pass