8000 python 2 compat urlencode · jssellars/wc-api-python@7873912 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7873912

Browse files
committed
python 2 compat urlencode
1 parent e3f1ffd commit 7873912

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

woocommerce/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111

1212
from requests import request
1313
from json import dumps as jsonencode
14-
from urllib.parse import urlencode
1514
from woocommerce.oauth import OAuth
1615

16+
try:
17+
from urllib.parse import urlencode
18+
except ImportError:
19+
from urllib import urlencode
20+
1721

1822
class API(object):
1923
""" API Class """

0 commit comments

Comments
 (0)
0