mirror of https://github.com/flaggo/pydu.git
move ulib and urlparse to compat
This commit is contained in:
parent
e2c73ac487
commit
a72791507f
|
@ -4,10 +4,14 @@ import sys
|
|||
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
||||
# urljoin
|
||||
# urllib, urlparse and urljoin
|
||||
if PY2:
|
||||
import urllib as ulib
|
||||
import urlparse
|
||||
from urlparse import urljoin
|
||||
else:
|
||||
import urllib.request as ulib
|
||||
import urllib.parse as urlparse
|
||||
from urllib.parse import urljoin
|
||||
|
||||
# Dictionary iteration
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from pydu.compat import PY2, string_types
|
||||
from pydu.compat import string_types, ulib, urlparse
|
||||
from pydu.string import safeunicode
|
||||
|
||||
if PY2:
|
||||
import urllib as ulib
|
||||
import urlparse
|
||||
else:
|
||||
import urllib.request as ulib
|
||||
import urllib.parse as urlparse
|
||||
|
||||
|
||||
class FileName(object):
|
||||
@staticmethod
|
||||
|
|
Loading…
Reference in New Issue