Skip to content

Commit c8e6e19

Browse files
committed
Fixed urljoin import for Python 3.x
1 parent 09ebf28 commit c8e6e19

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flask_oauth.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
"""
1111
import httplib2
1212
from functools import wraps
13-
from urlparse import urljoin
13+
# urlparse module has been renamed in Python 3.x
14+
try:
15+
from urlparse import urljoin
16+
except ImportError:
17+
from urllib.parse import urljoin
1418
from flask import request, session, json, redirect, Response
1519
from werkzeug import url_decode, url_encode, url_quote, \
1620
parse_options_header, Headers

0 commit comments

Comments
 (0)