From 85ce06850cf8f7e6bdf6d392d775c0efbbb38835 Mon Sep 17 00:00:00 2001 From: Jonathan Rehm Date: Thu, 13 Jul 2017 21:28:00 -0700 Subject: [PATCH] Fix for Python 3 --- cps/redirect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cps/redirect.py b/cps/redirect.py index fa3fa5c7..b521bc28 100644 --- a/cps/redirect.py +++ b/cps/redirect.py @@ -1,6 +1,9 @@ # http://flask.pocoo.org/snippets/62/ -from urlparse import urlparse, urljoin +try: + from urllib.parse import urlparse, urljoin +except ImportError: + from urlparse import urlparse, urljoin from flask import request, url_for, redirect