mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 01:32:57 -07:00
Add cloudinary v1.11.0
This commit is contained in:
parent
5710bcb43c
commit
136260a822
27 changed files with 10855 additions and 0 deletions
34
lib/cloudinary/compat.py
Normal file
34
lib/cloudinary/compat.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Copyright Cloudinary
|
||||
import six.moves.urllib.parse
|
||||
urlencode = six.moves.urllib.parse.urlencode
|
||||
unquote = six.moves.urllib.parse.unquote
|
||||
urlparse = six.moves.urllib.parse.urlparse
|
||||
parse_qs = six.moves.urllib.parse.parse_qs
|
||||
parse_qsl = six.moves.urllib.parse.parse_qsl
|
||||
quote_plus = six.moves.urllib.parse.quote_plus
|
||||
httplib = six.moves.http_client
|
||||
from six import PY3, string_types, StringIO, BytesIO
|
||||
urllib2 = six.moves.urllib.request
|
||||
NotConnected = six.moves.http_client.NotConnected
|
||||
|
||||
if PY3:
|
||||
to_bytes = lambda s: s.encode('utf8')
|
||||
to_bytearray = lambda s: bytearray(s, 'utf8')
|
||||
to_string = lambda b: b.decode('utf8')
|
||||
|
||||
else:
|
||||
to_bytes = str
|
||||
to_bytearray = str
|
||||
to_string = str
|
||||
|
||||
try:
|
||||
cldrange = xrange
|
||||
except NameError:
|
||||
def cldrange(*args, **kwargs):
|
||||
return iter(range(*args, **kwargs))
|
||||
|
||||
try:
|
||||
advance_iterator = next
|
||||
except NameError:
|
||||
def advance_iterator(it):
|
||||
return it.next()
|
Loading…
Add table
Add a link
Reference in a new issue