From cc92922386937d9f416e9166ac1e672a0f775b53 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Thu, 25 Jun 2015 22:24:03 +0300 Subject: Change all unicode() calls with six.text_type(). Fixes #5329. --- mediagoblin/plugins/archivalook/tools.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mediagoblin/plugins') diff --git a/mediagoblin/plugins/archivalook/tools.py b/mediagoblin/plugins/archivalook/tools.py index 9c715c9b..b495624c 100644 --- a/mediagoblin/plugins/archivalook/tools.py +++ b/mediagoblin/plugins/archivalook/tools.py @@ -13,6 +13,9 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . + +import six + from mediagoblin.db.models import MediaEntry, User from mediagoblin.plugins.archivalook.models import FeaturedMedia from mediagoblin.tools.translate import lazy_pass_to_ugettext as _ @@ -53,7 +56,7 @@ def parse_url(url): who uploaded the piece of media, slug is the media entry's url slug. """ - url = unicode(url) + url = six.text_type(url) u_end, m_start, m_end, end = (url.find('/u/') + 3, url.find('/m/'), url.find('/m/') + 3, @@ -84,7 +87,7 @@ def split_featured_media_list(featured_media): or tertiary) """ - featured_media = unicode(featured_media) + featured_media = six.text_type(featured_media) featured_media_list = featured_media.split("\n") display_type = 0 media_already_featured = [] -- cgit v1.2.3