Bug 1354012 - Fixed nice_type_name function always returning basestring. r=gfritzsche

Changed isinstance function to issubclass function since the nice_type_name function takes a type object as its input
This commit is contained in:
Arjun Nair 2017-04-11 05:02:08 +02:00
Родитель 11a7bc6f33
Коммит 8838b5602f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -20,7 +20,7 @@ DATE_PATTERN = r'^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
def nice_type_name(t): def nice_type_name(t):
if isinstance(t, basestring): if issubclass(t, basestring):
return "string" return "string"
return t.__name__ return t.__name__