use six.string_types instead of basestring for isinstance

This commit is contained in:
Dannon Baker
2017-12-12 09:27:53 -05:00
parent 78a2626d13
commit f6fbe63446
+2 -1
View File
@@ -4,6 +4,7 @@ import re
import sys
from json import loads
import six
from bx.seq.twobit import TwoBitFile
from galaxy.util.bunch import Bunch
@@ -26,7 +27,7 @@ messages = Bunch(
def decode_dbkey(dbkey):
""" Decodes dbkey and returns tuple ( username, dbkey )"""
if isinstance(dbkey, basestring) and ':' in dbkey:
if isinstance(dbkey, six.string_types) and ':' in dbkey:
return dbkey.split(':')
else:
return None, dbkey