Use isinstance(object, (types)) pattern instead of type(object) == types.Type
[htsworkflow.git] / htsworkflow / pipelines / sequences.py
index 17e65cf91d6ce9f848ca18947ee2ed279e8b3c8c..1d746c9844f8a82a15a586f76b8baa65dd594b9a 100644 (file)
@@ -7,6 +7,7 @@ import os
 import types
 import re
 import sys
+import six
 from six.moves.urllib.parse import urljoin, urlparse
 
 import RDF
@@ -376,7 +377,7 @@ def scan_for_sequences(dirs):
     Scan through a list of directories for sequence like files
     """
     sequences = []
-    if type(dirs) in types.StringTypes:
+    if isinstance(dirs, six.string_types):
         raise ValueError("You probably want a list or set, not a string")
 
     for d in dirs: