Skip to content

Commit 66910f5

Browse files
committed
Fix imports to support Python 3
Signed-off-by: Jiri Popelka <jpopelka@redhat.com>
1 parent 6b548c7 commit 66910f5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/packageurl.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@
2626

2727
from collections import namedtuple
2828

29-
from urllib import quote as percent_quote
30-
from urllib import unquote as percent_unquote
31-
3229
# Python 2 and 3 support
3330
try:
31+
# Python 2
3432
from urlparse import urlsplit
33+
from urllib import quote as percent_quote
34+
from urllib import unquote as percent_unquote
3535
except ImportError:
36+
# Python 3
3637
from urllib.parse import urlsplit
38+
from urllib.parse import quote as percent_quote
39+
from urllib.parse import unquote as percent_unquote
3740

3841
# Python 2 and 3 support
3942
try:

0 commit comments

Comments
 (0)