Check for ImportError rather than any exception
This commit is contained in:
parent
c35316f158
commit
3d12aa8a28
2 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import time
|
|||
from collections import namedtuple
|
||||
try:
|
||||
from urlparse import urlparse
|
||||
except:
|
||||
except ImportError:
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from .exceptions import ConnectionError, TimeoutError, PacketError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue