basestring->six.string_types

This commit is contained in:
j 2015-12-25 20:38:55 +05:30
commit 1db297169b
4 changed files with 11 additions and 5 deletions

View file

@ -5,6 +5,7 @@ from __future__ import print_function
import re
from six.moves import urllib
from six import string_types
from ox.utils import json
from ox.cache import read_url
@ -68,7 +69,7 @@ def get_movie_data(wikipedia_url):
value = value.split('<br>')
if value:
if key in filmbox:
if isinstance(value, list) and isinstance(filmbox[key], basestring):
if isinstance(value, list) and isinstance(filmbox[key], string_types):
filmbox[key] = [filmbox[key]] + value
else:
filmbox[key] += value