diff blast2html.py @ 51:b15a20c2372a

fix python 2 compatibility
author Jan Kanis <jan.code@jankanis.nl>
date Wed, 21 May 2014 18:34:35 +0200
parents bfc82a8aa3c9
children 4217bb9cf1d3
line wrap: on
line diff
--- a/blast2html.py	Wed May 21 18:17:03 2014 +0200
+++ b/blast2html.py	Wed May 21 18:34:35 2014 +0200
@@ -13,6 +13,7 @@
 import warnings
 from os import path
 from itertools import repeat
+import six
 import argparse
 from lxml import objectify
 import jinja2
@@ -22,7 +23,7 @@
 _filters = {}
 def filter(func_or_name):
     "Decorator to register a function as filter in the current jinja environment"
-    if isinstance(func_or_name, str):
+    if isinstance(func_or_name, six.string_types):
         def inner(func):
             _filters[func_or_name] = func.__name__
             return func